You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2020/01/17 11:50:13 UTC
[mynewt-core] branch master updated (cbbc33d -> 259432f)
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.
from cbbc33d Merge pull request #2157 from vrahane/remove_log_version_2
new 1490f1d Update uncrustify configuration
new 6ff4517 Add ignored directories list for CI style checking
new 259432f Add style checking to the CI
The 3 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:
.style_ignored_dirs | 10 ++++++++++
.travis.yml | 29 ++++++++++++++++++++++++-----
uncrustify.cfg | 22 +++++++++++-----------
3 files changed, 45 insertions(+), 16 deletions(-)
create mode 100644 .style_ignored_dirs
[mynewt-core] 01/03: Update uncrustify configuration
Posted by ut...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 1490f1dae45705938e5eabe0b24bf04d1e9c9f19
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Thu Jan 9 14:55:48 2020 -0300
Update uncrustify configuration
* Fix syntax issues for uncrustify==0.70.1
* Update a few config options to better reflect the current Mynewt style
---
uncrustify.cfg | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/uncrustify.cfg b/uncrustify.cfg
index 366d857..ff07d53 100644
--- a/uncrustify.cfg
+++ b/uncrustify.cfg
@@ -191,7 +191,7 @@ indent_relative_single_line_comments = false # false/true
# Spaces to indent 'case' from 'switch'
# Usually 0 or indent_columns.
-indent_switch_case = 4 # number
+indent_switch_case = 0 # number
# Spaces to shift the 'case' line, without affecting any other lines
# Usually 0.
@@ -302,7 +302,7 @@ sp_assign = add # ignore/add/remove/force
sp_cpp_lambda_assign = ignore # ignore/add/remove/force
# Add or remove space after the capture specification in C++11 lambda.
-sp_cpp_lambda_paren = ignore # ignore/add/remove/force
+sp_cpp_lambda_square_paren = ignore # ignore/add/remove/force
# Add or remove space around assignment operator '=' in a prototype
sp_assign_default = ignore # ignore/add/remove/force
@@ -344,7 +344,7 @@ sp_compare = add # ignore/add/remove/force
sp_inside_paren = remove # ignore/add/remove/force
# Add or remove space between nested parens: '((' vs ') )'
-sp_paren_paren = ignore # ignore/add/remove/force
+sp_paren_paren = remove # ignore/add/remove/force
# Add or remove space between back-to-back parens: ')(' vs ') ('
sp_cparen_oparen = ignore # ignore/add/remove/force
@@ -356,14 +356,14 @@ sp_balance_nested_parens = false # false/true
sp_paren_brace = add # ignore/add/remove/force
# Add or remove space before pointer star '*'
-sp_before_ptr_star = add # ignore/add/remove/force
+sp_before_ptr_star = add # ignore/add/remove/force
# Add or remove space before pointer star '*' that isn't followed by a variable name
# If set to 'ignore', sp_before_ptr_star is used instead.
sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force
# Add or remove space between pointer stars '*'
-sp_between_ptr_star = ignore # ignore/add/remove/force
+sp_between_ptr_star = remove # ignore/add/remove/force
# Add or remove space after pointer star '*', if followed by a word.
sp_after_ptr_star = ignore # ignore/add/remove/force
@@ -435,7 +435,7 @@ sp_permit_cpp11_shift = false # false/true
sp_before_sparen = add # ignore/add/remove/force
# Add or remove space inside if-condition '(' and ')'
-sp_inside_sparen = ignore # ignore/add/remove/force
+sp_inside_sparen = remove # ignore/add/remove/force
# Add or remove space before if-condition ')'. Overrides sp_inside_sparen.
sp_inside_sparen_close = ignore # ignore/add/remove/force
@@ -447,7 +447,7 @@ sp_inside_sparen_open = ignore # ignore/add/remove/force
sp_after_sparen = ignore # ignore/add/remove/force
# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while', etc.
-sp_sparen_brace = ignore # ignore/add/remove/force
+sp_sparen_brace = add # ignore/add/remove/force
# Add or remove space between 'invariant' and '(' in the D language.
sp_invariant_paren = ignore # ignore/add/remove/force
@@ -862,7 +862,7 @@ align_with_tabs = false # false/true
align_on_tabstop = false # false/true
# Whether to left-align numbers
-align_number_left = false # false/true
+#align_number_left = false # false/true
# Whether to keep whitespace not required for alignment.
align_keep_extra_space = false # false/true
@@ -1072,7 +1072,7 @@ nl_start_of_file = remove # ignore/add/remove/force
nl_start_of_file_min = 0 # number
# Add or remove newline at the end of the file
-nl_end_of_file = remove # ignore/add/remove/force
+nl_end_of_file = ignore # ignore/add/remove/force
# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
nl_end_of_file_min = 0 # number
@@ -1514,7 +1514,7 @@ pos_constr_colon = ignore # ignore/join/lead/lead_break/lead_fo
#
# Try to limit code width to N number of columns
-code_width = 79 # number
+code_width = 119 # number
# Whether to fully split long 'for' statements at semi-colons
ls_for_split_full = false # false/true
@@ -1889,7 +1889,7 @@ pp_define_at_level = false # false/true
# True: indent_func_call_param will be used (default)
# False: indent_func_call_param will NOT be used
-use_indent_func_call_param = true # false/true
+use_indent_func_call_param = false # false/true
# The value of the indentation for a continuation line is calculate differently if the line is:
# a declaration :your case with QString fileName ...
[mynewt-core] 02/03: Add ignored directories list for CI style
checking
Posted by ut...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 6ff4517ae6cf8274cdf0c0a883874a92499e5edd
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Thu Jan 16 11:30:41 2020 -0300
Add ignored directories list for CI style checking
Add a file containing a list of directories to ignore when running style
checks on the CI.
---
.style_ignored_dirs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.style_ignored_dirs b/.style_ignored_dirs
new file mode 100644
index 0000000..1ad70b3
--- /dev/null
+++ b/.style_ignored_dirs
@@ -0,0 +1,10 @@
+# Skip those directories while doing style checks in the CI. Do not add '/' at
+# the beginning!
+
+apps/coremark
+crypto/mbedtls
+crypto/tinycrypt
+libc/baselibc
+net/ip/lwip_base
+net/lora/node/src/mac
+net/mqtt/eclipse
[mynewt-core] 03/03: Add style checking to the CI
Posted by ut...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 259432f95e81a4f54938d6d725a2f5e581c79038
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Thu Jan 16 12:16:37 2020 -0300
Add style checking to the CI
Signed-off-by: Fabio Utzig <ut...@apache.org>
---
.travis.yml | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 5a4486a..095df51 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,6 +33,19 @@ git:
matrix:
include:
+ # Style checking
+ - os: linux
+ language: python
+ python:
+ - "3.5"
+ addons:
+ apt:
+ packages:
+ - "python3-pip"
+ env:
+ - TEST=STYLE
+ - DEBUG=1
+
# RAT Report
- os: linux
language: python
@@ -134,7 +147,7 @@ matrix:
before_install:
- printenv
- export GOPATH=$HOME/gopath
- - if [ "${TEST}" != "RAT" ]; then go version; fi
+ - if [ "${TEST}" != "RAT" && "${TEST}" != "STYLE" ]; then go version; fi
install:
- git clone https://github.com/JuulLabs-OSS/mynewt-travis-ci $HOME/ci
@@ -142,13 +155,17 @@ install:
- |
if [ "${TEST}" == "RAT" ]; then
pip install requests
+ elif [ "${TEST}" == "STYLE" ]; then
+ pip3 install requests
else
$HOME/ci/${TRAVIS_OS_NAME}_travis_install.sh
fi
before_script:
- |
- if [ "${TEST}" != "RAT" ]; then
+ if [ "${TEST}" == "STYLE" ]; then
+ $HOME/ci/install_uncrustify.sh
+ elif [ "${TEST}" != "RAT" ]; then
newt version
gcc --version
if [ "${TEST}" != "TEST_ALL" ]; then arm-none-eabi-gcc --version; fi
@@ -168,10 +185,12 @@ script:
pic32mx470_6lp_clicker pic32mz2048_wi-fire sensorhub
native"
- |
- if [ "${TEST}" != "RAT" ]; then
- $HOME/ci/run_test.sh
- else
+ if [ "${TEST}" == "STYLE" ]; then
+ python3 $HOME/ci/check_style.py
+ elif [ "${TEST}" == "RAT" ]; then
python $HOME/ci/check_license.py
+ else
+ $HOME/ci/run_test.sh
fi
cache: