Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#8786] Platform: Add javafmtCheck to arc lint.
Summary: Add a script and regex linter that does this. Current solution has few workarounds and is bit slow to run. But gets the job done. KI: There is impedence mismatch between javafmtCheckAll which checks all files and arc lint which invokes multiple instances of checks one for each file. Thus there is some redundant work being done. Test Plan: - Made chages to multiple java files that were not formatted. Checked that arc lint fails ``` 19:50 ~/code/yugabyte-db/managed [lint_javafmt] $ arc lint >>> Lint for /home/sbapat/code/yugabyte-db: Error (S&RX) Lint Unformatted files according to javafmt Error (S&RX) Lint Unformatted files according to javafmt 19:50 ~/code/yugabyte-db/managed [lint_javafmt] $ ``` - Made changes to multiple java files that were properly formatted. Checke that arc lint does not fail ``` 18:51 ~/code/yugabyte-db/managed [lint_javafmt] $ arc lint OKAY No lint warnings. ``` - Combination of above (few well formatted and few badly formatted files) ``` 19:51 ~/code/yugabyte-db/managed [lint_javafmt] $ arc lint >>> Lint for managed/src/main/java/com/yugabyte/yw/models/Region.java: Error (S&RX) Lint Unformatted files according to javafmt Error (S&RX) Lint Unformatted files according to javafmt 19:52 ~/code/yugabyte-db/managed [lint_javafmt] $ ``` Reviewers: arnav Reviewed By: arnav Subscribers: yugaware Differential Revision: https://phabricator.dev.yugabyte.com/D11838
- Loading branch information