Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORT should ignore empty .ort.yml files #3861

Closed
sschuberth opened this issue Apr 9, 2021 · 1 comment
Closed

ORT should ignore empty .ort.yml files #3861

sschuberth opened this issue Apr 9, 2021 · 1 comment
Assignees
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements

Comments

@sschuberth
Copy link
Member

Currently, ORT chokes on empty .ort.yml files:

Exception in thread "main" com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (File); line: 3, column: 1]
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4688)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4586)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3433)
	at org.ossreviewtoolkit.analyzer.Analyzer.analyze(Analyzer.kt:170)
	at org.ossreviewtoolkit.commands.AnalyzerCommand.run(AnalyzerCommand.kt:166)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:180)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:189)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:17)
	at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:396)
	at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:393)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:411)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:436)
	at org.ossreviewtoolkit.OrtMainKt.main(OrtMain.kt:217)

We should simply ignore empty files instead of failing. but still fail on files with real syntax errors.

@sschuberth sschuberth added analyzer About the analyzer tool enhancement Issues that are considered to be enhancements labels Apr 9, 2021
@sschuberth sschuberth self-assigned this Apr 9, 2021
@sschuberth
Copy link
Member Author

sschuberth added a commit that referenced this issue Apr 9, 2021
Fixes #3861.

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Apr 12, 2021
Fixes #3861.

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Apr 12, 2021
Fixes #3861.

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Apr 12, 2021
Fixes #3861.

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Apr 20, 2021
Fixes #3861.

Signed-off-by: Sebastian Schuberth <[email protected]>
sschuberth added a commit that referenced this issue Apr 23, 2021
sschuberth added a commit that referenced this issue Apr 23, 2021
sschuberth added a commit that referenced this issue May 18, 2021
sschuberth added a commit that referenced this issue May 18, 2021
sschuberth added a commit that referenced this issue Jun 3, 2021
sschuberth added a commit that referenced this issue Jun 3, 2021
sschuberth added a commit that referenced this issue Jun 4, 2021
sschuberth added a commit that referenced this issue Jun 4, 2021
sschuberth added a commit that referenced this issue Jun 4, 2021
sschuberth added a commit that referenced this issue Jun 4, 2021
Besides for repository configuration files (".ort.yml"), this is also
done for package curation files as otherwise some code areas would look
inconsistent.

Fixes #3861.

Signed-off-by: Sebastian Schuberth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant