GithubHelp home page GithubHelp logo

julienpalard / sphinx-lint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sphinx-contrib/sphinx-lint

0.0 2.0 0.0 267 KB

Repository to work on cpython's rstlint.

License: Other

Shell 3.85% Python 96.15%

sphinx-lint's Introduction

Sphinx Lint

PyPI Monthly downloads Supported Python Version GitHub Workflow Status

Sphinx Lint is based on rstlint.py from CPython.

What is Sphinx Lint, what is it not?

sphinx-lint should:

  • be reasonably fast so it's comfortable to use as a linter in your editor.
  • be usable on a single file.
  • not give any false positives (probably a utopia, but let's try).
  • not spend too much effort finding errors that sphinx-build already finds (or can easily find).
  • focus on finding errors that are not visible to sphinx-build.

Known issues

Currently Sphinx Lint can't work with tables, there's no understanding of how linesplit works in tables, like:

   +-----------------------------------------+-----------------------------+---------------+
   | Method                                  | Checks that                 | New in        |
   +=========================================+=============================+===============+
   | :meth:`assertEqual(a, b)                | ``a == b``                  |               |
   | <TestCase.assertEqual>`                 |                             |               |
   +-----------------------------------------+-----------------------------+---------------+

as Sphinx Lint works line by line it will inevitably think the :meth: role is not closed properly.

To avoid false positives, some rules are skipped if we're in a table.

Releasing

First test with friends projects by running:

sh download-more-tests.sh
python -m pytest

Bump the version in sphinxlint.py, commit, tag, push:

git tag v0.6.5
git push
git push --tags

To release on PyPI run:

python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*

License

As this script was in the CPython repository the license is the Python Software Foundation Licence Version 2, see the LICENSE file for a full version.

sphinx-lint's People

Contributors

julienpalard avatar birkenfeld avatar benjaminp avatar hugovk avatar matilda-me avatar jeanas avatar csabella avatar cclauss avatar ezio-melotti avatar gpshead avatar arhadthedev avatar zware avatar

Watchers

James Cloos avatar  avatar

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.