#298 astyle with the "--exclude" option

wont-fix
Jim Pattee
exclude (1)
7
2015-01-03
2014-08-03
Brian Wallace
No

I love astyle, but recently hit a usage problem that I was unable to figure out. I am not sure if this is a bug, or I am simply using the tool incorrectly.

I am attempting to use the "--exclude" option to omit files and directories from processing, but continue to get an "unmatched" exclude error and astyle terminates:

bwallace$ ls -l foo.c
-rw-r--r-- 1 bwallace 1767304860 22 Aug 1 21:36 foo.c

bwallace$ astyle ./foo.c --exclude=./foo.c -v
Artistic Style 2.04 08/03/2014
Exclude (unmatched) ./foo.c

Artistic Style has terminated

When I pass the "-i" (ignore exclude errors) astyle processes the file as expected. Hence, it seems to be a problem with the "exclude" statement.

bwallace$ astyle ./foo.c --exclude=./foo.c -v -i
Artistic Style 2.04 08/03/2014
Exclude (unmatched) ./foo.c
Unchanged ./foo.c
0 formatted 1 unchanged 0.00 seconds 2 lines

Is this a bug? Am I using astyle incorrectly? Any help would be appreciated.

-Brian

Discussion

  • Jim Pattee
    Jim Pattee
    2014-11-28

    • status: open --> wont-fix
    • Priority: 5 --> 7
     
  • Jim Pattee
    Jim Pattee
    2014-11-28

    Exclude is usually used with wildcards.
    You seem to be excluding the file you are trying to process?