Skip to content
Open
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
12 changes: 3 additions & 9 deletions .buildkite/commands/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,20 @@ fi

"$(dirname "${BASH_SOURCE[0]}")/restore-cache.sh"

echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :globe_with_meridians: Check Locales Declaration Consistency"
bundle exec fastlane check_declared_locales_consistency app:"$1"

echo "--- :microscope: Linting"

if [ "$1" = "wordpress" ]; then
./gradlew lintWordpressRelease
./gradlew lintWordpressDebug
exit 0
fi

if [ "$1" = "jetpack" ]; then
set +e
./gradlew lintJetpackRelease
./gradlew lintJetpackDebug
lint_exit_code=$?
set -e

upload_sarif_to_github "WordPress/build/reports/lint-results-jetpackRelease.sarif"
upload_sarif_to_github "WordPress/build/reports/lint-results-jetpackDebug.sarif"
exit $lint_exit_code
fi

Expand Down
31 changes: 31 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ steps:
artifact_paths:
- "**/build/reports/detekt/detekt.html"

- label: "🌐 Locale Consistency"
command: |
if .buildkite/commands/should-skip-job.sh --job-type validation; then
exit 0
fi

Comment on lines +64 to +67
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Locale Consistency step uses should-skip-job.sh --job-type validation, which (per should-skip-job.sh) will skip when changes are limited to fastlane/**, config/**, and **/strings.xml. Since this job’s purpose is to validate Fastlane locale lists vs Gradle resourceConfigurations, skipping on those files can let inconsistencies slip through. Consider using a job-type/skip rule that still runs when fastlane/lanes/localization.rb (and related locale config) changes, or adjust the skip logic for this step accordingly.

Suggested change
if .buildkite/commands/should-skip-job.sh --job-type validation; then
exit 0
fi

Copilot uses AI. Check for mistakes.
install_gems
bundle exec fastlane check_declared_locales_consistency app:wordpress
bundle exec fastlane check_declared_locales_consistency app:jetpack
plugins: [$CI_TOOLKIT]

- label: "🕵️ Lint WordPress"
command: ".buildkite/commands/lint.sh wordpress"
plugins: [$CI_TOOLKIT]
Expand All @@ -71,6 +82,26 @@ steps:
artifact_paths:
- "**/build/reports/lint-results*.*"

- label: "🕵️ Lint libs:editor"
command: |
if .buildkite/commands/should-skip-job.sh --job-type lint; then
exit 0
fi

.buildkite/commands/restore-cache.sh
./gradlew :libs:editor:lint
plugins: [$CI_TOOLKIT]
Comment on lines +85 to +93
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job runs ./gradlew :libs:editor:lint. If the intent is to lint the Debug variant for speed (matching the app lint switch to Debug), consider invoking the variant-specific task (e.g., :libs:editor:lintDebug) to avoid running additional variants. Also consider adding artifact_paths for lint reports (like the app lint steps) so failures are debuggable from CI artifacts.

Copilot uses AI. Check for mistakes.

- label: "🕵️ Lint libs:image-editor"
command: |
if .buildkite/commands/should-skip-job.sh --job-type lint; then
exit 0
fi

.buildkite/commands/restore-cache.sh
./gradlew :libs:image-editor:lint
plugins: [$CI_TOOLKIT]
Comment on lines +102 to +103
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the editor lint step: ./gradlew :libs:image-editor:lint may run more than the Debug variant. If the goal is Debug-only lint for faster CI, prefer the variant-specific lint task (e.g., :libs:image-editor:lintDebug). Also add artifact_paths for lint reports so the job produces the same diagnostics as the app lint steps.

Suggested change
./gradlew :libs:image-editor:lint
plugins: [$CI_TOOLKIT]
./gradlew :libs:image-editor:lintDebug
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"

Copilot uses AI. Check for mistakes.

#################
# Diff Reports
#################
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ subprojects {
android {
lint {
warningsAsErrors = true
checkDependencies true
checkDependencies false
checkGeneratedSources = true
lintConfig file("${project.rootDir}/config/lint/lint.xml")
baseline file("${project.rootDir}/config/lint/baseline.xml")
Expand Down
Loading
Loading