Skip to content

Improvement: Include Modelines rules in files where Alerts has been addded

Alex Turbov requested to merge (removed):feature/add-modelines into master

Performed w/

diff -rub <(grep -nilr "##Modelines" *.xml) <(grep -nilr "##Alerts" *.xml) \
  | grep '^+[a-z]' \
  | sed 's,^+,,'  \
  | while read f; do \
        echo "---[ $f ]---"; \
        indent=$(grep '##Alerts' $f | head -n 1 | sed 's,\(\s\+\)<Include.*,\1,' ); \
        sed "/##Alerts/ a \\${indent}<IncludeRules context=\"##Modelines\" />" -i $f; \
    done
  • manually version incremented.

Merge request reports

Loading