Skip to content

Commit

Permalink
Fix suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushRedHat committed Dec 27, 2023
1 parent 5fc600e commit d59ed6b
Showing 1 changed file with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
* MIT License
*
* Copyright (c) 2023 Jenkins Infra
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package io.jenkins.pluginhealth.scoring.probes;

import io.jenkins.pluginhealth.scoring.model.Plugin;
Expand All @@ -11,6 +35,9 @@
import java.nio.file.Path;
import java.util.stream.Stream;

/**
* This probe checks whether build failed on Default Branch or not.
*/
@Component
@Order(FailingBuildProbe.ORDER)
public class FailingBuildProbe extends Probe{

Check warning on line 43 in core/src/main/java/io/jenkins/pluginhealth/scoring/probes/FailingBuildProbe.java

View check run for this annotation

ci.jenkins.io / Java Compiler

maven-compiler-plugin:compile

ERROR: io.jenkins.pluginhealth.scoring.probes.FailingBuildProbe is not abstract and does not override abstract method getVersion() in io.jenkins.pluginhealth.scoring.probes.Probe

Check warning on line 43 in core/src/main/java/io/jenkins/pluginhealth/scoring/probes/FailingBuildProbe.java

View check run for this annotation

ci.jenkins.io / Java Compiler

ERROR: io.jenkins.pluginhealth.scoring.probes.FailingBuildProbe is not abstract and does not override abstract method getVersion() in io.jenkins.pluginhealth.scoring.probes.Probe
Expand All @@ -25,7 +52,7 @@ protected ProbeResult doApply(Plugin plugin, ProbeContext context){
return ProbeResult.success(key(),"There is no local repository for plugin " + plugin.getName() + ".");

Check warning on line 52 in core/src/main/java/io/jenkins/pluginhealth/scoring/probes/FailingBuildProbe.java

View check run for this annotation

ci.jenkins.io / Java Compiler

maven-compiler-plugin:compile

ERROR: method success in record io.jenkins.pluginhealth.scoring.model.ProbeResult cannot be applied to given types;

Check warning on line 52 in core/src/main/java/io/jenkins/pluginhealth/scoring/probes/FailingBuildProbe.java

View check run for this annotation

ci.jenkins.io / Java Compiler

ERROR: method success in record io.jenkins.pluginhealth.scoring.model.ProbeResult cannot be applied to given types;
}
try {
if(repoContainsJenkins(context).equals("Jenkinsfile found")){
if(repoContainsJenkins(context).toString().equals("Jenkinsfile found")){

final GitHub gh = context.getGitHub();
final GHRepository repository = gh.getRepository(context.getRepositoryName(plugin.getScm()).orElseThrow());

Check warning on line 58 in core/src/main/java/io/jenkins/pluginhealth/scoring/probes/FailingBuildProbe.java

View check run for this annotation

ci.jenkins.io / Java Compiler

maven-compiler-plugin:compile

ERROR: method getRepositoryName in class io.jenkins.pluginhealth.scoring.probes.ProbeContext cannot be applied to given types;

Check warning on line 58 in core/src/main/java/io/jenkins/pluginhealth/scoring/probes/FailingBuildProbe.java

View check run for this annotation

ci.jenkins.io / Java Compiler

ERROR: method getRepositoryName in class io.jenkins.pluginhealth.scoring.probes.ProbeContext cannot be applied to given types;
Expand Down

0 comments on commit d59ed6b

Please sign in to comment.