Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single line regular expressions are too forgiving #5

Closed
rockg opened this issue Jul 11, 2013 · 2 comments
Closed

Single line regular expressions are too forgiving #5

rockg opened this issue Jul 11, 2013 · 2 comments
Labels

Comments

@rockg
Copy link

rockg commented Jul 11, 2013

The single line regular expressions match too many words. For example, the file regex, ^(\s_File:?\s_)(.*)$, matches filename, File, file, etc. Having any of these words at the beginning of a comment block for a method, for example, causes the doxypypy script to fail. A similar thing happens with date. If a method brief description starts the word "date", it is treated as a "@Date" tag rather than a string. One solution is to make these tags more explicit by making the semi-colon as not optional. Or perhaps they can only be active in the top module comment block, but not in any class/method/function/etc. definitions. I understand that these expressions are written for flexibility, but right now they are too flexible.

@Feneric
Copy link
Owner

Feneric commented Jul 13, 2013

Good point. I don't think there's any reason not to require the colon; both the PEP and Google's example use it. Anyone disagree?

@Feneric
Copy link
Owner

Feneric commented Jul 22, 2013

OK, it now requires the colons. This is probably enough to get rid of 99.9% of all false positives.

@Feneric Feneric closed this as completed Jul 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants