Remove -d flag from 'find' - #28013
Conversation
42b2d08 to
b4a9f78
Compare
thats not a bad idea. however that would be difficult to do, I mean using I did make some other comment changes, like the header comments. |
b42d1a9 to
a856f39
Compare
…er883/Marlin into bugfix-2.1.x-August3
… into bugfix-2.1.x-August3
This part of the regular expression may cause exponential backtracking on strings starting with '0,' and containing many repetitions of ' 0,'. CodeQL
… into bugfix-2.1.x-August3
pioutil.py - If is too complex (MC0001) lerdge.py - Consider using enumerate instead of iterating with range and len validate_boards.py - last_groun is unused, typo? (last_group)
add "clean" option for mftest
|
Sweeping style changes not affecting behavior (i.e., not fixing a reported bug, implementing a requested feature, improving front-facing user experience) will no longer be accepted from any contributor. Only core maintainers will be allowed, and only in specific sprints as part of scheduled refactoring. We are not enforcing style to this degree in our Python and BASH scripts. Contributors should feel free to use whatever Python style suits them, be it casual or pedantic. Sometimes an author prefers 'string' and sometimes "string" as cues in a specific instance, such as when a string is meant to be printed versus something meant only as an identifier. The only thing we assert (mostly) is 4-space indent because that's a general Python guideline. |
|
unfortunately build_all_examples does not work =====================
Proceed with builds...
=====================
find: unknown predicate `-s'
Exitingnot sure how to use this in windows but in my running which then runs # Must be called from another script (or with --allow)
[[ $ALLOW || $SHLVL -gt 2 ]] || { echo "Don't call this script directly, use build_all_examples instead." ; exit 1 ; }but it isn't being called directly..I'm using |
|
Some LLM suggests something like this, if you want to try it on systems to see if it produces the desired lexical sorting: if [ "$(uname -s)" = "Darwin" ]; then
# BSD/macOS: -ds does post-order and per-directory lexical sort
FIND="find -ds"
else
# GNU/Linux: use -depth for post-order, and pipe through LC_ALL=C sort -z
FIND='find -depth "$@" -print0 | LC_ALL=C sort -z'
fi
#. . .
# Use the FIND variable with "$CBASE/config/examples" and any other args
eval $FIND "$CBASE/config/examples" \
-type d \( -name 'Configuration.h' -o -name 'Configuration_adv.h' \) \
| while IFS= read -r -d $'\0' CONF; do
# process $CONF
done |
|
This is the order we're looking for: `$ build_all_examples --nobuild --purge` |
|
The precise order doesn't matter, especially. It just has to be consistent from build to build so one can resume in the middle after a cancel or fail. Changes pushed in 122dfa1. |
Description
This aims to fix some formatting, as well as update comments.
one big imrpovement is languageImport.py, so before it would print in the terminal basically garbage, unreable... this organizes the print output to something way better and understandable.
Also, running
build_all_examples,format_codewould give issues.Mostly, changes are the header comments to the file. like adding the name of the file, and using
"""for python commentsUpdated/improved other .sh scripts
-dsinfindoptionuncrusitfy [file]kept repeating, addingshiftfixed thatRequirements
Benefits
Improve readability, formatting
Configurations
Related Issues