Comments (7)
My concern would be for systems where the file look up is expensive (for example, at Google we're using one). This may delay the initial start of revive a lot depending on how deeply nested is the current working directory.
from revive.
perhaps introduce a cli argument to disable config discovery?
I imagine for most people, file lookup isn't expensive.
from revive.
I can make vim find a revive.toml to use, but I'd rather rely on revive itself for that.
Maybe that's good enough? I'm trying to keep the configuration minimalistic and do not introduce any further configuration options/logic when it could be achieved with external tools.
I'll keep the issue open in case this is a pain that many people want to resolve.
from revive.
Another concern with auto discovery is that you do not know precisely which configuration you are actually using (if you known which conf you are "auto discovering" then why not just point it explicitly?)
from revive.
But it already finds a config in a home directory, which means developers can get different results from revive on their different computers based on whether they have one in home directory or not, whereas if one is in the repository, then they will have consistent results if they just say revive.
I'd also argue that auto finding configuration by looking up folders is a common pattern and less surprising than it not doing that.
from revive.
But it already finds a config in a home directory, which means developers can get different results from revive on their different computers based on whether they have one in home directory or not, whereas if one is in the repository, then they will have consistent results if they just say revive.
I'm more leaning towards dropping this feature.
I'd also argue that auto finding configuration by looking up folders is a common pattern and less surprising than it not doing that.
This is more common for dynamic languages, I'd say. In Node.js it's a common practice. I'm not confident it's a good one.
from revive.
Let's close this feature request for now and revisit if it's in a higher demand.
from revive.
Related Issues (20)
- Support Suggested Fixes (--fix) HOT 2
- Comment spacing isn't being ignored
- rule `exported` add `checkPublicInterface` option to check documentation in public interface definition HOT 1
- Rule `optimize-operands-order` reports potentially dangerous change when `len` of slice is used before slice accesing. HOT 2
- negative add-constant report when expr is not **ast.Ident**
- Multiple scopes to string-format rule HOT 1
- Exclude files base on patterns
- New release for Go 1.22 support? HOT 2
- Params column position incorrect if placed on new line HOT 4
- Request: treat min, max and clear as built-in functions HOT 1
- Request: report "redefinition of the built-in" errors for function related variables HOT 4
- enforce-slice-style: Add declaration style HOT 8
- False Positive in rule max-control-nesting HOT 3
- False positive datarace detection in Go 1.22 HOT 2
- var-naming rule can suggest invalid identifiers HOT 2
- comment-spacings exceptions do not work if there's no colon after the exception HOT 2
- Possible false positive confusing-naming error on generics with pointer type receiver HOT 2
- duplicate-imports linter broken? HOT 3
- out-of-order rules in documentation HOT 1
- Regressions related to 4242f24 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from revive.