Skip to content

Have travis enforce Allman brace style#4368

Closed
JackStouffer wants to merge 1 commit intodlang:masterfrom
JackStouffer:patch-9
Closed

Have travis enforce Allman brace style#4368
JackStouffer wants to merge 1 commit intodlang:masterfrom
JackStouffer:patch-9

Conversation

@JackStouffer
Copy link
Contributor

I could use a little regex help with this one.

The given regex gives false positives for things like

xml.onEndTag["description"]  = (in Element e) { book.description = e.text(); };

which are legal. I have the following regex to detect this case

\{ ([[:print:]][^}])* \}

The problem is I don't know how to grep for all matches of the first regex but that don't also match the second pattern.

@wilzbach
Copy link
Contributor

@JackStouffer I made a PR to Dscanner to support this and avoid the case of false positives ;-)

dlang-community/D-Scanner#348

Ping @Hackerpilot

@wilzbach
Copy link
Contributor

@JackStouffer there are more than 2K matches - subtracting the false positives (when the closing parenthesis is on the same line), that's still quite a lot.
Do you want to write a small script that searches for valid all-man violations and fixes them?

@JackStouffer
Copy link
Contributor Author

@wilzbach I would need to make the regex for it, which I said I don't know how to do.

@wilzbach
Copy link
Contributor

@wilzbach I would need to make the regex for it, which I said I don't know how to do.

Oh sorry - have a look at #4385

@JackStouffer JackStouffer deleted the patch-9 branch May 31, 2016 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants