Comments (12)
Can you explain why we need a grumphp.yml.dist file?
The idea is to add the same git hooks for every user so that the same rules are applied for every user.
from grumphp.
If one team decided to store configuration file on repository it's cool.
But then sb will want to have a bit different configuration, and he can't.
.dist
file is file to be distributed with repository, non-dist file is private one.
Real-user-cases:
- team decide to use tasks A+B, but sb want to run C as well.
- configuring things like stashing depending on individual needs
from grumphp.
I think that "grumphp.yml.dist" is not grumphp concern. If you want it you can add it to your project and commit to your repo and smiply add grumphp.yml to .gitignore
from grumphp.
That's exactly the plan. Exactly the same usage like let say phpunit.xml
and phpunit.xml.dist
.
But, following phpunit example, when you have .xml
file phpunit will use it by default, and if not then phpunit will try to find .xml.dist
file without the need of manually providing the configuration file.
Same thing would be awesome for grumphp, to use grumphp.yml
if exists, and if not try to use grumphp.yml.dist
.
from grumphp.
@keradus I get you point and it seems easy implement
Personally I would love to see similar mechanism that symfony has with their parameters.yml and parameters.yml.dist (parameters.yml is generated or updated after composer install/update command)
from grumphp.
Well I am not fully convinced: As I mentioned, GrumPHP is used for assuring the same coding standards, code quality, ... When you depend on a tool for this, you don't want all users to possibly have their own config. By allowing user specific config's, you will get situations where you expect that a certain tool has run, but it hasn't because the user has overwritten the configuration.
The idea is to let GrumPHP handle the rules you've decided as a project / team. If somebody wants to contribute to that project, he should play it by the rules that were globally set.
I agree that it isn't a lot of work to implement, but I am looking for a valid use-case that is in the line of the ideology of the tool.
On the other hand: there are already a lot of ways to trick the system (commit -n, custom config files for the tool it runs, ...)
from grumphp.
What about the stashing thing?
from grumphp.
that might be a valid option. We don't want people come in and complain about GrumPHP is eating their code when they enabled the stash option ...
from grumphp.
Actually the same thing for verbose. One like small, one like big. Even when running same ruleset.
from grumphp.
Good point. The only concern I have is that people will add / remove tasks so that the checks that should run aren't running during a commit. But I don't think that is something we can enforce anyway.
from grumphp.
I am working on the dist support:
veewee@9583413
Can you verify the locator to make sure that this is how it should work?
I will finish this PR when I find some more time :)
from grumphp.
The dist file is added in PR #135. I also changed the default value of the ignore_unstaged_changes
option to false. More info about the issue in #123.
from grumphp.
Related Issues (20)
- With GrumPHP php-cs-fixer is not able to exclude the directories as configured in .php-cs-fixer.php HOT 3
- Custom task not working when parallel option is enabled HOT 5
- Add support for PSR-4/`composer dump-autoload` testing HOT 3
- Consider adding a `composer.lock` file in the repository HOT 14
- phpcs does not detect default ruleset xml file HOT 6
- PHPMD task does not check all file extensions HOT 5
- Don't do commit message checks on merges? HOT 8
- Memory is not being released in parallel execution HOT 2
- Grumphp running without `.git` folder? HOT 4
- Print the commit message when failing on `git_commit_message` HOT 4
- how can I use grum with docker-compose ? HOT 3
- Fails to Recognize PHPStan Baseline During Commit Workflow
- Override open_basedir only for grumphp test HOT 2
- Grumphp config using default PHPCS XML and other standard's sniff HOT 2
- Undefined constant PhpParser\ParserFactory::PREFER_PHP7 when using `nikic/php-parser` version 5. HOT 1
- Support multiple php versions for tasks HOT 2
- [Task] Add bin/console task for Symfony HOT 1
- husky/lint-staged compatibility HOT 5
- The application requires the version "^7.2" or greater. HOT 2
- Support for multiple PHPStan tasks HOT 2
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 grumphp.