Commit Graph
10 Commits
Author SHA1 Message Date
Aleksey Khoroshilov ffd10a5576 Add support for upstream presubmit logic on npm run lint. 2022-06-20 17:30:24 +07:00
Emerick Rogul f2637c24d5 Use pylint-2.7 2022-05-17 19:59:23 -04:00
bridiver 746a12dd1b fix pylint to use depot_tools 2022-05-04 11:54:42 -07:00
Mikhail fb548e0bd0 Remove root.js (#10653)
* Replace some path.join() to config.* entries

* Remove root.js

* Review fix
2021-10-27 13:19:22 +07:00
Mikhail df4bab98a5 Use upper case drives letters in builds for win (#10493)
* Use upper case drives letter in build for win

* Change names

* Review fixes

* clang format

* Use fs.realpathSync.native

* Use config.rootDir
2021-10-22 16:01:07 +07:00
mkarolin 01af140ac1 Normialized line endings after adding .gitattributes. 2021-08-05 10:22:04 -04:00
mkarolin a120ad2719 Fixes pylint reports with no content.
When pylint is run with --report option on CI and pylint produces no
output, then the Jenkins parsing plugin errors out because it needs at
least an EOL to be present in the report file.

This change checks if the report file is empty and recreates it with an
EOL.

Fixes brave/brave-browser#17351
2021-08-04 13:18:49 -04:00
mkarolin 952d6d7de0 Don't install pylint for python3 globally on Linux/MacOS.
Only install on Windows where python3 from depot_tools is used.
On Linux/MacOS we leave it up to the user to install pylint on their
system.

Fixes brave/brave-browser#16415
2021-06-15 18:00:02 -04:00
mkarolin e3e20fac3f Fixes pylint command for python3 scripts.
Checks scripts for python3 header and if detected uses python3's pylint.

Installs pylint for python3 via pip.
2021-06-10 16:44:15 -04:00
MaxandMihai PLESA 5f5c81251f Converts npm run pylint command to use js (#8782)
* Converts npm run pylint command to use js.

Currently `npm run pylint` triggers a shell script to run pylint.
This a) doesn't work on windows b) doesn't use correct path to pylint
because depot_tools isn't in the PATH.

This change adds the same functionality that the shell script provides
to our js scripts. It also adds depot_tools/python2-bin and python2-bin
to the PATH as recommended by Chromium.

* Modifies pylint script to work with folders.

Version of pylint that comes with depot_tools doesn't process
directories unless they have __init__.py file. To get around
this limitation we need to find all python files ourselves and
pass them to pylint.

This needs to accout for command line lenth limitation on Windows.

Also use different config files for python2 and python3.

* Added pylint resource file for python2

* Modified .pylint2rc the same as .pylintrc

* Ensure depot_tools is in the path when invoking pylint.

* TEMP: pylint testing.

* Update Jenkinsfile

* Update bump-version.py

* Update Jenkinsfile

Co-authored-by: Mihai PLESA <mplesa@brave.com>
2021-05-27 20:48:20 +01:00