Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Ignore Flake8 "Line too long" error in gitlab CI

I’m using flake8 in my gitlab CI stage. my .gitlab-ci.yaml linting stage looks like this :

linting:
  stage: linting
  tags:
    - docker
  before_script:
    - pip3 install flake8
  script:
    - flake8 .
  only:
    - merge_requests

Is there a way to ignore the "line too long" error when running my pipeline ? Like a conf file to edit ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Yeah you can do it by passing an argument.

linting:
  stage: linting
  tags:
    - docker
  before_script:
    - pip3 install flake8
  script:
    - flake8 --ignore=E501 .
  only:
    - merge_requests
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading