You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ce...@apache.org on 2024/10/15 22:58:03 UTC

(nuttx) branch releases/12.7 updated (002d89885e -> 07c48eb7d0)

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

cederom pushed a change to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from 002d89885e net: Remove IFF_DOWN flag to compatible with Linux/*BSD
     new cc711e0c99 tools: exit with error if py needs to format
     new 07c48eb7d0 tools: make isort and black formatters to work together

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/linters/setup.cfg | 1 +
 tools/checkpatch.sh       | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)


(nuttx) 01/02: tools: exit with error if py needs to format

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit cc711e0c999dd89c0221b408e832ddbec7fb5ea9
Author: xuxingliang <xu...@xiaomi.com>
AuthorDate: Fri Aug 9 15:46:16 2024 +0800

    tools: exit with error if py needs to format
    
    Make CI fail if format not pass.
    
    Signed-off-by: xuxingliang <xu...@xiaomi.com>
---
 tools/checkpatch.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index db3c48d5a9..992a87c3e9 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -83,9 +83,9 @@ check_file() {
   fi
 
   if [ ${@##*.} == 'py' ]; then
-    black --check $@
-    flake8 --config ${TOOLDIR}/../.github/linters/setup.cfg $@
-    isort $@
+    black --check $@ || fail=1
+    flake8 --config ${TOOLDIR}/../.github/linters/setup.cfg $@ || fail=1
+    isort $@ || fail=1
   elif [ "$(is_rust_file $@)" == "1" ]; then
     if ! command -v rustfmt &> /dev/null; then
       fail=1


(nuttx) 02/02: tools: make isort and black formatters to work together

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 07c48eb7d00d0a5c99d7f4ed8769ea80e915ca87
Author: xuxingliang <xu...@xiaomi.com>
AuthorDate: Fri Aug 16 09:58:13 2024 +0800

    tools: make isort and black formatters to work together
    
    Config multi line output to mode 3, so isort and black can agree with
    each other:
    ```
    3 - Vertical Hanging Indent
    
    from third_party import (
        lib1,
        lib2,
        lib3,
        lib4,
    )
    ```
    
    Signed-off-by: xuxingliang <xu...@xiaomi.com>
---
 .github/linters/setup.cfg | 1 +
 tools/checkpatch.sh       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/linters/setup.cfg b/.github/linters/setup.cfg
index b0224c1475..1f065ea750 100644
--- a/.github/linters/setup.cfg
+++ b/.github/linters/setup.cfg
@@ -2,6 +2,7 @@
 ignore = W503,W605,E203
 max-complexity = 27
 max-line-length = 125
+multi_line_output=3
 show-source = True
 statistics = True
 
diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 992a87c3e9..4153c02ce2 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -85,7 +85,7 @@ check_file() {
   if [ ${@##*.} == 'py' ]; then
     black --check $@ || fail=1
     flake8 --config ${TOOLDIR}/../.github/linters/setup.cfg $@ || fail=1
-    isort $@ || fail=1
+    isort --settings-path ${TOOLDIR}/../.github/linters/setup.cfg $@ || fail=1
   elif [ "$(is_rust_file $@)" == "1" ]; then
     if ! command -v rustfmt &> /dev/null; then
       fail=1