Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

pycodestyle doesn't apply configurations in .gitlint.yaml #136

Open
ccavales3 opened this issue Jan 18, 2019 · 0 comments
Open

pycodestyle doesn't apply configurations in .gitlint.yaml #136

ccavales3 opened this issue Jan 18, 2019 · 0 comments

Comments

@ccavales3
Copy link

Hi,

I am new to python and to using pycodestyle so I appologize if I'm doing this all wrong.

I am using git lint in travis to lint my python code with a customized .gitlint.yaml located at the root of my folder.

# Python
pylint:
  extensions:
    - .py
  command: pylint
  arguments:
    - --rcfile={DEFAULT_CONFIGS}/pylintrc
    - --output-format=text
    - >-
      --msg-template={{abspath}}:{{line}}:{{column}}:
      [{{category}}:{{symbol}}] {{obj}}: {{msg}}
    - --reports=n
  filter: >-
    ^{filename}:(?P<line>{lines}):((?P<column>\d+):)?
    \[(?P<severity>.+):(?P<message_id>\S+)\]\s+(:
    )?(?P<message>.+)$
  installation: "Run pip install pylint."

# Sample output:
# package/module.py:68:80: E501 line too long (80 > 79 characters)
pycodestyle:
  extensions:
    - .py
  command: pycodestyle
  arguments:
    - "--max-line-length=100"
  filter: >-
    ^{filename}:(?P<line>{lines}):((?P<column>\d+):)?
    (?P<message_id>\S+) (?P<message>.+)$
  installation: "Run pip install pycodestyle."

The only thing I changed here is I increased the max-line-length to 100.

I ran a travis build with the following code

language: python
python:
   - "2.7"

install:
  - echo "install..."
  - pip install pylint
  - pip install pycodestyle
  - pip install git-lint

script:
  - echo "script..."
  - git reset --soft ${TRAVIS_COMMIT_RANGE%...*} && git lint

Travis logs shows me error such as line 124, col 0: Convention: [line-too-long]: Line too long (87/80)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant