robotframework-robocop icon indicating copy to clipboard operation
robotframework-robocop copied to clipboard

[Rule] Mixed language in the file

Open bhirsz opened this issue 1 year ago • 0 comments

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).

bhirsz avatar Jul 23 '22 09:07 bhirsz