Commit Graph

19 Commits

Author SHA1 Message Date
Oliver Stöneberg 18d24e2420
reduce.py: some fixes (#3914)
* reduce.py: fixed potential "TypeError: slice indices must be integers or None or have an __index__ method" in combinelines()

* reduce.py: the combinelines() changes were not applied when the chunk mode was used
2022-03-21 17:14:47 +01:00
Oliver Stöneberg 8fc5c93803
refactored reduce.py into a class and added unit test for it (#3791) 2022-03-19 19:42:44 +01:00
Paul Fultz II 508fa6284c
Python fixes for reduce.py (#3795) 2022-02-05 08:32:01 +01:00
Oliver Stöneberg 34317f86ab
reduce.py: several improvements (#3701) 2022-01-13 07:52:47 +01:00
Oliver Stöneberg 4f508c93c4
reduce.py: improved --segfault / added detection of "hang" caused by reduced code / cleanups (#3693) 2022-01-12 22:26:32 +01:00
Sebastian bfbfeefbb3 reduce.py: Allow reducing error messages, print output in case of error (#2179)
* reduce.py: Allow reducing error messages, print output in case of error

Allow reducing code that triggers (false positive) error messages.
Print Cppcheck output in case Cppcheck returns unsuccessfully and no
segfault is expected. This helps fixing messed up command lines (for
example issues with the path).

* Use "else" as suggested
2019-10-04 21:22:59 +02:00
Daniel Marjamäki d84dbf6b5f reduce.py: Improved help text 2019-03-03 20:18:54 +01:00
amai2012 27d4495d41 Add executable bit to reduce.py 2018-03-21 09:13:26 +01:00
Ayaz Salikhov 3dc4188292 Improve Python code 2017-06-05 13:23:00 +02:00
Ayaz Salikhov 2dd6168258 Improve Python code 2017-06-04 22:51:48 +02:00
XhmikosR 07b43c6929 Ran autopep8. 2016-07-25 13:16:55 +03:00
Daniel Marjamäki 8ef17e70ca reduce: try removing codeblocks below ';{}' 2016-01-28 08:05:43 +01:00
Daniel Marjamäki 477d02bbe7 reduce: fix
[ci skip]
2016-01-27 15:30:10 +01:00
Daniel Marjamäki 4d2caff360 reduce: try to reduce blocks better 2016-01-27 15:03:52 +01:00
Daniel Marjamäki ef1dd89d72 reduce: cleanups 2016-01-27 08:20:58 +01:00
Daniel Marjamäki cb6c9e1a71 reduce.py: fix hang 2016-01-25 16:25:50 +01:00
Daniel Marjamäki 620c6e8f1c reduce: improved removing of code blocks. loop until nothing is removed. 2016-01-25 13:41:27 +01:00
Daniel Marjamäki 7d8853d604 reduce: speed up the 'combinelines' pass 2016-01-21 14:42:10 +01:00
Daniel Marjamäki 49ff511324 Added script reduce.py that reduces code. It can complement the reduce tool. It can also be used with other tools and not just cppcheck. 2016-01-21 11:03:55 +01:00