Skip to content

Changed CLI help display code, and added option to ignore names by regexp.#31

Open
adhihargo wants to merge 4 commits into
skelterjohn:masterfrom
adhihargo:master
Open

Changed CLI help display code, and added option to ignore names by regexp.#31
adhihargo wants to merge 4 commits into
skelterjohn:masterfrom
adhihargo:master

Conversation

@adhihargo
Copy link
Copy Markdown

Hi John,

Here's the modifications I made, in addition to Lachlan's:

  • I changed help display code to use standard "flag" module's facility, to avoid having to update that one "Usage:" line every time there's a new flag.
  • Added a flag to ignore files by regexp pattern; without it rerun also monitors temp files whose name merely prefixed (like emacs'). On malformed regexp, print error and ignore the regexp. I only need to check prefix, but this way maybe it'd be a bit more useful.

Comment thread rerun.go Outdated
// other files in the directory don't count - we watch the whole thing in case new .go files appear.
if filepath.Ext(we.Name) != ".go" {
if fn := filepath.Base(we.Name) ;
(ignoreRe != nil && ignoreRe.FindString(fn) != "") || filepath.Ext(fn) != ".go" {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please run gofmt - this line doesn't look like what gofmt would come up with.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done in later commit.

@maxnordlund
Copy link
Copy Markdown

If you add "Fixes #15" to the description/commit message GitHub automatically closes that issue when this is merge.

…elterjohn#15

Some tools create temp files that rerun won't ignore if relying only on extension (e.g. on editing X.go emacs creates .#X.go).
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.

4 participants