Skip to content

[linting] Cleaning up linting documentation#3881

Closed
john-bodley wants to merge 1 commit into
apache:masterfrom
john-bodley:john-bodley-streamline-local-linting
Closed

[linting] Cleaning up linting documentation#3881
john-bodley wants to merge 1 commit into
apache:masterfrom
john-bodley:john-bodley-streamline-local-linting

Conversation

@john-bodley
Copy link
Copy Markdown
Member

Per @timifasubaa's suggestion I updated the linting logic in CONTRIBUTING.md. Simply running flake8 or (npm run lint for that matter) doesn't work off the bat as one needs to i) install all the flake8 extensions, and ii) cd to superset/assets respectively.

For the flake8 case given that the configuration logic resides in the tox.ini file it seemed to make more sense to direct people to invoke tox locally for linting both Python and Javascript code. The later required an additional tox test environment which is not invoked by Travis since the javascript environment is a superset of eslint.

Copy link
Copy Markdown
Contributor

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if flake8 deps should go into dev-reqs.txt

@john-bodley
Copy link
Copy Markdown
Member Author

@xrmx I see you point. Couldn't one also argue that from a testing perspective instead of having flake8, pylint, etc. defined in dev-reqs.txt, we should merely have tox, and then tox.ini would handle all the testing dependencies?

@xrmx
Copy link
Copy Markdown
Contributor

xrmx commented Nov 17, 2017

I suspect not many people run tox on their machine, but just rely on CI. Either way it's good for me.

@mistercrunch
Copy link
Copy Markdown
Member

I also think of tox as something CI-related. I'd prefer having the flake8 config in .flake8 and telling people to run the flake8 command. It makes it more clear. With tox it's unclear what you're actually running and you have to follow the redirection to know what's up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants