diff options
author | Assaf Gordon <assafgordon@gmail.com> | 2018-08-03 23:58:37 -0600 |
---|---|---|
committer | Assaf Gordon <assafgordon@gmail.com> | 2018-08-04 22:09:58 -0600 |
commit | a2cda80ecd3cf363b1503ef882350f5ef32eca7e (patch) | |
tree | 17e8184a24536981be3a3e1cc7256e9a48a3226f /cfg.mk | |
parent | 4766cf67171f4d2fc568cc5c2735b5281fad53d1 (diff) | |
download | sed-a2cda80ecd3cf363b1503ef882350f5ef32eca7e.tar.gz |
maint: syntax-check: prohibit-operator-at-eol
* cfg.mk (sc_prohibit_operator_at_end_of_line): Copied from coreutils'
cfg.mk.
* sed/execute.c (do_subst,execute_program): Adjust as needed.
Diffstat (limited to 'cfg.mk')
-rw-r--r-- | cfg.mk | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -287,6 +287,18 @@ sc_prohibit_test_empty: halt='use `compare /dev/null ...`, not `test -s ...` in tests/' \ $(_sc_search_regexp) +# With split lines, don't leave an operator at end of line. +# Instead, put it on the following line, where it is more apparent. +# Don't bother checking for "*" at end of line, since it provokes +# far too many false positives, matching constructs like "TYPE *". +# Similarly, omit "=" (initializers). +binop_re_ ?= [-/+^!<>]|[-/+*^!<>=]=|&&?|\|\|?|<<=?|>>=? +sc_prohibit_operator_at_end_of_line: + @prohibit='. ($(binop_re_))$$' \ + in_vc_files='\.[chly]$$' \ + halt='found operator at end of line' \ + $(_sc_search_regexp) + update-copyright-env = \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 |