Commit Graph

6 Commits (dbbecb58754ac875a19f312640114a6677076f2b)

Author SHA1 Message Date
Adrien Vergé dbbecb5875 Refactor project layout to import yamllint alone
Currently importing yamllint recursively imports its submodules, which
finally requires having pyyaml installed. This is a problem when you
just want to import APP_VERSION from yamllint. For instance, setup.py
imports yamllint to know the version, but doesn't know yet that pyyaml
is to be installed, because it is stated in setup.py itself.

To solve this, yamllint/__init__.py will only contain constants. The
linting functions will be in yamllint/linter.py.
9 years ago
Adrien Vergé 044c049462 Doc: Document rules 9 years ago
Adrien Vergé d617eb70ae Rules: Keep a persistent context for token rules
This will be needed to build a clean indentation checking algorithm.
9 years ago
Adrien Vergé f09aef4f89 Rules: comments-indentation: Allow two levels
Previously only comments that were indented like the following content
line were allowed, e.g.:

    prev: line:
      # commented line
      current: line

With this change, such new cases are also allowed:

      prev: line
      # commented line 1
    # commented line 2
    current: line
9 years ago
Adrien Vergé 1934206cef Rules: comments-indentation: Fix typo 9 years ago
Adrien Vergé 233a70adb3 Rules: Add the 'comments-indentation' rule 9 years ago