Skip to content

Commit

Permalink
Exclude generated catalog from lint checks
Browse files Browse the repository at this point in the history
The following commit will contain generated code that does not at all comply with our lint settings. This commit changes them so it will pass.
It's an isolated commit so it can be reversed once we've fixed this in the future
  • Loading branch information
michpohl committed Jun 19, 2024
1 parent 8290842 commit 363afe1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ sdkModules.forEach {
tasks.dokkaHtmlMultiModule.configure {
moduleVersion = "bom-${project(":bom").property("version")}"
includes.setFrom("README.md")
pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.base.DokkaBase" to
"""{"footerMessage": "© ${LocalDate.now().year} TIDAL"}"""
))
pluginsMapConfiguration.set(
mapOf(
"org.jetbrains.dokka.base.DokkaBase" to
"""{"footerMessage": "© ${LocalDate.now().year} TIDAL"}""",
),
)
}
25 changes: 22 additions & 3 deletions static-analysis/config/detekt-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,41 @@ exceptions:
naming:
FunctionNaming:
ignoreAnnotated: ['Composable']

ConstructorParameterNaming:
excludes: ['**/catalog/**']
performance:
SpreadOperator:
active: false

style:
MaxLineLength:
maxLineLength: 100
excludes: ['**/test/**', '**/androidTest/**']
excludes: ['**/test/**', '**/androidTest/**', '**/catalog/**']
UnusedPrivateMember:
ignoreAnnotated: [ 'Preview' ]
ThrowsCount:
excludes: ['**/catalog/**']
MagicNumber:
excludes: ['**/test/**',
'**/androidTest/**','**/catalog/**']
ForbiddenComment:
excludes: ['**/catalog/**']
ReturnCount:
excludes: ['**/catalog/**']
UseCheckOrError:
excludes: ['**/catalog/**']

complexity:
LargeClass:
excludes: ['**/test/**', '**/androidTest/**']
LongParameterList:
excludes: ['**Module.kt', '**Service.kt', '**Repository.kt', '**/test/**', '**/androidTest/**']
TooManyFunctions:
excludes: ['**Module.kt', '**Service.kt', '**Repository.kt', '**/test/**', '**/androidTest/**']
excludes: ['**Module.kt', '**Service.kt', '**Repository.kt', '**/test/**',
'**/androidTest/**', '**/catalog/**']
CyclomaticComplexMethod:
excludes: ['**/catalog/**']
LongMethod:
excludes: ['**/catalog/**']
NestedBlockDepth:
excludes: [ '**/catalog/**' ]
5 changes: 3 additions & 2 deletions static-analysis/run-ktlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ fi
# Specify which files to analyze
files_argument=""
for i in "${input[@]}"; do
files_argument="$files_argument\"./$i\" "
files_argument="$files_argument\"./$i\" !**catalog/**"
done

if [ "$files_argument" == "" ]; then
files_argument="**/*.kt **/*.kts !**/build/**"
files_argument="**/*.kt **/*.kts !**/build/** !catalog/**"
fi

echo
echo "Running ktlint..."
command="$command $files_argument --experimental --reporter plain --baseline=$CONFIG_DIR/ktlint-baseline.xml"

eval "$command"
echo "Done."

0 comments on commit 363afe1

Please sign in to comment.