You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2020/01/09 00:39:08 UTC

[spark] branch branch-2.4 updated: [SPARK-30450][INFRA][FOLLOWUP][2.4] Fix git folder regex for windows file separator

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new e52ae4e  [SPARK-30450][INFRA][FOLLOWUP][2.4] Fix git folder regex for windows file separator
e52ae4e is described below

commit e52ae4e4551284be7f6757ee7fe4296a7efe0cc6
Author: Eric Chang <er...@databricks.com>
AuthorDate: Wed Jan 8 16:38:19 2020 -0800

    [SPARK-30450][INFRA][FOLLOWUP][2.4] Fix git folder regex for windows file separator
    
    ### What changes were proposed in this pull request?
    
    The regex is to exclude the .git folder for the python linter, but bash escaping caused only one forward slash to be included.  This adds the necessary second slash.
    
    ### Why are the changes needed?
    
    This is necessary to properly match the file separator character.
    
    ### Does this PR introduce any user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manually.
    Added File dev/something.git.py and ran `dev/lint-python`
    ```dev/lint-python
    pycodestyle checks failed.
    *** Error compiling './dev/something.git.py'...
      File "./dev/something.git.py", line 1
        mport asdf2
                  ^
    SyntaxError: invalid syntax```
    
    Closes #27139 from ericfchang/SPARK-30450.
    
    Authored-by: Eric Chang <er...@databricks.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 dev/lint-python | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/lint-python b/dev/lint-python
index 9453f86..caffb73 100755
--- a/dev/lint-python
+++ b/dev/lint-python
@@ -30,7 +30,7 @@ SPHINX_REPORT_PATH="$SPARK_ROOT_DIR/dev/sphinx-report.txt"
 cd "$SPARK_ROOT_DIR"
 
 # compileall: https://docs.python.org/2/library/compileall.html
-python -B -m compileall -q -l -x "[/\\][.]git" $PATHS_TO_CHECK > "$PYCODESTYLE_REPORT_PATH"
+python -B -m compileall -q -l -x "[/\\\\][.]git" $PATHS_TO_CHECK > "$PYCODESTYLE_REPORT_PATH"
 compile_status="${PIPESTATUS[0]}"
 
 # Get pycodestyle at runtime so that we don't rely on it being installed on the build server.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org