diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2022-03-23 11:52:56 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-03-23 20:02:45 +0000 |
commit | 6abdf0edd97aa76ccc42d65ed0e30f401d75f79f (patch) | |
tree | 2c184885c32cdcb6588f09348b7728b8f28fe238 /sonar-scanner-engine | |
parent | 6a65e721a78da9cb82b5990100bb62b907311310 (diff) | |
download | sonarqube-6abdf0edd97aa76ccc42d65ed0e30f401d75f79f.tar.gz sonarqube-6abdf0edd97aa76ccc42d65ed0e30f401d75f79f.zip |
Fix SonarQube quality issues
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/cache/package-info.java | 23 | ||||
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java | 8 |
2 files changed, 27 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cache/package-info.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cache/package-info.java new file mode 100644 index 00000000000..e12301670ed --- /dev/null +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cache/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2022 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.scanner.cache; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java index 1a7acc61189..5a46e41a90f 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java @@ -37,10 +37,10 @@ public class ScmChangedFilesProvider { @Bean("ScmChangedFiles") public ScmChangedFiles provide(ScmConfiguration scmConfiguration, BranchConfiguration branchConfiguration, DefaultInputProject project) { - Path rootBaseDir = project.getBaseDir(); - Collection<Path> changedFiles = loadChangedFilesIfNeeded(scmConfiguration, branchConfiguration, rootBaseDir); - validatePaths(changedFiles); - return new ScmChangedFiles(changedFiles); + Path rootBaseDir = project.getBaseDir(); + Collection<Path> changedFiles = loadChangedFilesIfNeeded(scmConfiguration, branchConfiguration, rootBaseDir); + validatePaths(changedFiles); + return new ScmChangedFiles(changedFiles); } private static void validatePaths(@javax.annotation.Nullable Collection<Path> paths) { |