Skip to content

Commit

Permalink
Be more verbose regarding Dockerfile location.
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzegorz-Sii committed Dec 22, 2020
1 parent 7ed9ed9 commit 7e36455
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>container-check-sonar-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<name>Container-Check Plugin for SonarQube</name>
<version>0.0.3</version>
<version>0.0.4</version>
<description>A Sonar plugin which will look at a trivy-generated container vulnerability scan
output file in JSON format and transform and upload the data to a running sonar instance.
Invoked by sonar-scanner which knows where the running Sonar instance is.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ public ContainerCheckSensor(final FileSystem fileSystem, final PathResolver path
final FilePredicate filePredicate = context.fileSystem().predicates().matchesPathPattern(dockerPath);
final Iterator<InputFile> files = context.fileSystem().inputFiles(filePredicate).iterator();
final ContainerImageDependencyReason dependencyReason;

if (!files.hasNext()) {
LOGGER.warn("No Dockerfiles found matching path property {}. ", dockerPath);
LOGGER.warn("No Dockerfiles found matching path property: {}", dockerPath);
LOGGER.warn("Please check also sonar.sources property eg. in sonar-project.properties, as it can be used as a prefix for above docker path.");
LOGGER.debug("baseDir is set to: {}", context.fileSystem().baseDir());
context.fileSystem().inputFiles(context.fileSystem().predicates().all()).forEach(
inputFile -> LOGGER.debug("inputFile.relativePath: {}", inputFile.relativePath())
);
dependencyReason = null;
}
else {
Expand Down

0 comments on commit 7e36455

Please sign in to comment.