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

Add include_file option #337

Merged
merged 12 commits into from
Oct 24, 2022
Merged

Add include_file option #337

merged 12 commits into from
Oct 24, 2022

Conversation

silverwind
Copy link
Contributor

@silverwind silverwind commented Oct 17, 2022

Useful option to specify individual files to watch. I renamed the watchDir function to watchPath because it can also handle single files fine (filepath.Walk emits a single file if passed a file path).

Fixes: #307

Example of it working with a pure include_dir and include_file config:

image

Useful option to specify individual files to watch. I renamed the
`watchDir` function to `watchPath` because it can also handle single
files fine (`filepath.Walk` emits a single file if passed a file path).

Fixes: air-verse#307
@codecov
Copy link

codecov bot commented Oct 17, 2022

Codecov Report

Merging #337 (86c9cb0) into master (63b6ba3) will increase coverage by 1.45%.
The diff coverage is 95.23%.

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   69.16%   70.62%   +1.45%     
==========================================
  Files           7        7              
  Lines         960      977      +17     
==========================================
+ Hits          664      690      +26     
+ Misses        225      217       -8     
+ Partials       71       70       -1     
Impacted Files Coverage Δ
runner/engine.go 65.36% <83.33%> (+1.75%) ⬆️
runner/config.go 75.22% <100.00%> (+0.11%) ⬆️
runner/util.go 74.31% <100.00%> (+2.71%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@silverwind
Copy link
Contributor Author

Will see to adding a test as well.

@silverwind
Copy link
Contributor Author

silverwind commented Oct 17, 2022

Good to go now.

This PR is also available for use via go run github.com/silverwind/air@v1.41.0 --help.

@silverwind
Copy link
Contributor Author

There is some flakiness on CI related to test TestRebuildWhenRunCmdUsingDLV, but I don't think it's related to this PR.

Copy link
Collaborator

@xiantang xiantang left a comment

Choose a reason for hiding this comment

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

LGTM totally

@xiantang xiantang merged commit 25c287e into air-verse:master Oct 24, 2022
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.

include_file option for single files
2 participants