tinyAdapter opened a new pull request, #1161:
URL: https://github.com/apache/singa/pull/1161

   As documented in the repo, many 
[formatters](https://github.com/apache/singa/tree/dev-postgresql/tool/code-format)
 & [linters](https://github.com/apache/singa/tree/dev-postgresql/tool/linting) 
are used, which can be annoying to manage and execute.
   
   To tackle this, I recommend using [pre-commit](https://pre-commit.com/) to 
combine all formatting, lining, and checking tools into a single run.
   
   Specifically, I added `.pre-commit-config.yaml` to configure all tools 
listed in the repo. One can then use 
   ```sh
   pre-commit run --all-files
   ```
   in the repo root folder to execute all of them.
   
   I ran the command locally and auto-fixed 402 files. Other linting problems 
have to be addressed manually, e.g., reinterpret_cast instead of C-style cast. 
The full log is available 
[here](https://github.com/apache/singa/files/15106596/precommit-errors.log).
   
   
   Considering whether this automatic process would break the code correctness 
or not, at least it has passed all written tests (by running the test GitHub 
action [here](https://github.com/tinyAdapter/singa/actions/runs/8829158893)).
   
   In the future, the pre-commit trigger can be added to GitHub action for 
checking & auto-fixing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@singa.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to