MarketSquare / MarketSquare/robotframework-robocop
[Rule] Mixed language in the file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 269
- Forks
- 58
- Avg merge
- 4h 55m
- Merged PRs (30d)
- 45
Description
Since the new mutli language support (#640) we should add rule that would check if the language used across file is consistent. For example if almost all the markers are using finnish, we should point the markers in other languages.
First step would be analysis if it can be easily done - since we can only recognize language markers if they are passed from cli (--language fi). If someone then uses another language in the file that is not set from cli it will not be recognized as proper marker. Hovewer this rule can still be used to check consistency of the translation (if the project enforce using one language over the other).
Rule should have configurable that change the behaviour from checking the 'outliers' to strict enforcing usage of configured language (ie if the whole file is in english but we conifgure czech it should report all markers in the file).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by reviewing the multilingual support in #640 and the --language fi CLI path; clarify how recognized markers and outliers are identified, then define configuration for outlier versus strict mode and tests that distinguish both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- internationalization, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100