Coder Social home page Coder Social logo

Use lint tool about gwsl-source HOT 5 CLOSED

opticos avatar opticos commented on June 18, 2024 1
Use lint tool

from gwsl-source.

Comments (5)

vasilvestre avatar vasilvestre commented on June 18, 2024 1

Not for Py, but Github action is free (and should be ok for your needs)

from gwsl-source.

sanzoghenzo avatar sanzoghenzo commented on June 18, 2024 1

HI, here's a list of good tools that comes in handy

Basically, you just need to add some configuration files for those tools, do pip install pre-config and pre-commit install;
this way the pre-commit hooks are installed and run everytime you do a commit.
You can also run it manually on every file of the project via pre-commit run --all-files;
There's also the official github action that will run the checks on the commits and PRs (useful if contributors forget to install the hooks).

Obviously I would also add pytest for unit testing and pytest-cov to make sure your code is properly tested.
The github documentation explains how to create a github action for pytest.
For better insights on the code coverage, you can use codecov.

I can setup something for, but some settings are subjective.
The first thing to choose is the desired line length; I've settled with 80 for my projects, so that I can have two panes in my IDE for faster copy/pasting or testing, etc.

from gwsl-source.

sanzoghenzo avatar sanzoghenzo commented on June 18, 2024 1

To configure pylint behaviour you have to put a pylintrc in the root directory.
To disable specific checks on lines or entire modules see the FAQ.
Also, since pylint is a static checker, you don't need to install the dependencies of your project.

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

That sounds good. I unfortunately do not have experience with linters or "CI"'s. Any recommendations?

from gwsl-source.

Pololot64 avatar Pololot64 commented on June 18, 2024

I have the github action for pylint turned on at the moment. What annoys me is that the big things it dislikes are not changeable and are necessary for the code to work. I am not sure how to git around this.

from gwsl-source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.