nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ab...@apache.org
Subject [nifi-minifi-cpp] branch main updated: MINIFICPP-1586-`make linter` gives errors when it is run in an unpacked release tarball
Date Tue, 22 Jun 2021 09:11:49 GMT
This is an automated email from the ASF dual-hosted git repository.

aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new f2a0a42  MINIFICPP-1586-`make linter` gives errors when it is run in an unpacked
release tarball
f2a0a42 is described below

commit f2a0a42c55d5befcf7cf55b692987dbffa9d161b
Author: aminadinari19 <aminadinari19@gmail.com>
AuthorDate: Tue Jun 15 11:59:03 2021 +0200

    MINIFICPP-1586-`make linter` gives errors when it is run in an unpacked release tarball
    
    MINIFICPP-1586-keeping script_dir variable
    
    MINIFICPP-1586-Removed '/' from sub-directories
    
    MINIFICPP-1586-`make linter` gives errors when it is run in an unpacked released tarball
    
    MINIFICPP-1586-new line at the end
    
    Signed-off-by: Arpad Boda <aboda@apache.org>
---
 thirdparty/google-styleguide/run_linter.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/thirdparty/google-styleguide/run_linter.py b/thirdparty/google-styleguide/run_linter.py
index 1cf03a0..7f7f6fd 100644
--- a/thirdparty/google-styleguide/run_linter.py
+++ b/thirdparty/google-styleguide/run_linter.py
@@ -2,9 +2,7 @@ import argparse
 import os
 import cpplint
 
-script_dir = os.path.dirname(os.path.realpath(__file__))
 parser = argparse.ArgumentParser()
-
 parser.add_argument('-i', '--includePaths', nargs="+", help='Run linter check in these directories')
 parser.add_argument('-q', '--quiet', action='store_true', help='Don\'t print anything if
no errors are found.')
 args = parser.parse_args()
@@ -16,7 +14,8 @@ for include_path in args.includePaths:
       if (".h" in file_name) or (".cpp" in file_name):
         list_of_files += [os.path.join(dir_path, file_name)]
 
-repository_path = script_dir + "../../"
+script_dir = os.path.dirname(os.path.realpath(__file__))
+repository_path = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir))
 
 arg_list = list()
 arg_list.append("--linelength=200")

Mime
View raw message