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

fix: more about groovy linter warnings #436

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/linters/.groovylintrc.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
{
"extends": "recommended",
"rules": {
"design.BuilderMethodWithSideEffects": "off",
"exceptions.CatchException": "off",
"dry.DuplicateMapLiteral": "off",
"dry.DuplicateStringLiteral": "off",
"groovyism.ExplicitHashMapInstantiation": "off",
"name.FactoryMethodName": "off",
"naming.FieldName": "off",
"unnecessary.Instanceof": "off",
"formatting.LineLength": "off",
"size.NestedBlockDepth": {
"maxNestedBlockDepth": 12
},
"size.ParameterCount": {
"maxParameters": 19
},
"name.ParameterName": "off",
"name.PropertyName": "off",
"serialization.SerializableClassMustDefineSerialVersionUID": "off",
"ThrowExceptionFromFinallyBlock": "off",
"naming.VariableName": "off",
"convention.VariableTypeRequired": "off"
"naming.VariableName": "off"
}
}
4 changes: 2 additions & 2 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Build {
String openjdkSource = ''
String openjdk_built_config = ''
String dockerImageDigest = ''
Map<String,String> dependency_version = new HashMap<String,String>()
HashMap<String,String> dependency_version = [:]
String crossCompileVersionPath = ''
Map variantVersion = [:]

Expand Down Expand Up @@ -1413,7 +1413,7 @@ class Build {
context.sh '''
#!/bin/bash
set -eu
echo "Signing JMOD files"
echo 'Signing JMOD files'
TMP_DIR="${macos_base_path}/"
ENTITLEMENTS="$WORKSPACE/entitlements.plist"
FILES=$(find "${TMP_DIR}" -perm +111 -type f -o -name '*.dylib' -type f || find "${TMP_DIR}" -perm /111 -type f -o -name '*.dylib' -type f)
Expand Down
10 changes: 6 additions & 4 deletions pipelines/build/regeneration/build_pipeline_generator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ node('worker') {
SCRIPT : "${scriptFolderPath}/openjdk_pipeline.groovy",
disableJob : false,
pipelineSchedule : '0 0 31 2 0', // 31st Feb, so will never run,
<<<<<<< HEAD
adoptScripts : false,
releaseType : 'Nightly'
=======
adoptScripts : false
>>>>>>> 112beac (fix: ReturnNullFromCatchBlock return -> continue)
]

def target
Expand All @@ -184,9 +188,7 @@ node('worker') {
target = load "${WORKSPACE}/${ADOPT_DEFAULTS_JSON['configDirectories']['nightly']}/jdk${javaVersion}u.groovy"
} catch (NoSuchFileException e4) {
println "[WARNING] No config found for JDK${javaVersion} in the User's or Adopt's repository. Skipping generation..."
// break and move to next element in the loop
// groovylint-disable-next-line
return
continue // break and move to next element in the loop
}
}
checkoutUserPipelines()
Expand Down Expand Up @@ -284,7 +286,7 @@ node('worker') {
println "[SUCCESS] THE FOLLOWING PIPELINES WERE GENERATED IN THE ${jobRoot} FOLDER"
println generatedPipelines
}
}
}
} finally {
// Always clean up, even on failure (doesn't delete the created jobs)
println '[INFO] Cleaning up...'
Expand Down