Skip to content

feat: add source file existence validation to config lint#976

Merged
andrii-bodnar merged 1 commit intocrowdin:mainfrom
StanislavPlotnikov-inDriver:fix/lint-sources-existing-validation
Jan 21, 2026
Merged

feat: add source file existence validation to config lint#976
andrii-bodnar merged 1 commit intocrowdin:mainfrom
StanislavPlotnikov-inDriver:fix/lint-sources-existing-validation

Conversation

@StanislavPlotnikov-inDriver
Copy link
Copy Markdown
Contributor

Add source file existence validation to crowdin config lint

Summary

Add source file existence validation to crowdin config lint command.

Problem

When a developer deletes a Gradle module (or any source files), the Crowdin sync workflow fails because the source files specified in the configuration no longer exist. Currently, there's no way to detect this misconfiguration before running the actual sync.

Solution

The config lint command now validates that source files/patterns specified in the configuration actually match existing files on the filesystem. If no files match a source pattern, the command reports an error.

Changes

  • Added checkSourceFilesExist() method to validate source file patterns
  • Added error message error.config.source_not_found for missing sources
  • Added unit tests covering:
    • Exact file paths
    • Glob patterns (*.xml)
    • Recursive patterns (**/*.xml)

Test plan

  • Run crowdin config lint with valid config — should pass
  • Run crowdin config lint with non-existent source path — should report error
  • Run crowdin config lint with glob pattern matching no files — should report error
  • Unit tests pass: ./gradlew test --tests "com.crowdin.cli.properties.*"

@StanislavPlotnikov-inDriver StanislavPlotnikov-inDriver force-pushed the fix/lint-sources-existing-validation branch from 46db178 to 006e810 Compare January 20, 2026 16:28
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.30%. Comparing base (73e1ba1) to head (006e810).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...om/crowdin/cli/properties/PropertiesWithFiles.java 84.62% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #976      +/-   ##
============================================
- Coverage     65.42%   65.30%   -0.12%     
  Complexity     1671     1671              
============================================
  Files           244      244              
  Lines          6838     6860      +22     
  Branches       1033     1043      +10     
============================================
+ Hits           4473     4479       +6     
- Misses         1777     1787      +10     
- Partials        588      594       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for the contribution @StanislavPlotnikov-inDriver!

@andrii-bodnar andrii-bodnar merged commit 37573aa into crowdin:main Jan 21, 2026
9 checks passed
@StanislavPlotnikov-inDriver
Copy link
Copy Markdown
Contributor Author

@andrii-bodnar Hi! Could you please tell me when I can expect a release with this change?

@andrii-bodnar
Copy link
Copy Markdown
Member

Hi @StanislavPlotnikov-inDriver,
We expect a few more PRs to be submitted before the next release, so I estimate that the new release will be ready at the end of January or the beginning of February.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants