andreoliwa / nitpick

Enforce the same settings on multiple projects
https://nitpick.readthedocs.io/
MIT License
393 stars 24 forks source link

feat: suggest styles based on the file types in the project #629

Closed andreoliwa closed 9 months ago

andreoliwa commented 9 months ago

Issues fixed by this pull request:

Proposed changes

  1. Option --suggest on nitpick init, to scan project files and suggest styles based on file type (extension).
  2. Option --fix to edit files in place.
  3. New pre-commit hook nitpick-suggest.
  4. Use the built-in styles by default but allow you to choose a custom directory with --library.
  5. The names of options and TOML keys suggested in #331 were slightly modified; check the docs in this pull request.

Checklist

coveralls commented 9 months ago

Pull Request Test Coverage Report for Build 6845131875


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/nitpick/cli.py 50 54 92.59%
<!-- Total: 208 212 98.11% -->
Files with Coverage Reduction New Missed Lines %
src/nitpick/cli.py 1 88.89%
src/nitpick/style.py 2 91.82%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 6840572461: -0.1%
Covered Lines: 2088
Relevant Lines: 2155

💛 - Coveralls
github-actions[bot] commented 8 months ago

:tada: This PR is included in version 0.35.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: