Ignore Flake8 "Line too long" error in gitlab CI

Advertisements

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 ?

>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

Leave a ReplyCancel reply