backdevs / laravel-dotenv-sniffer Goto Github PK
View Code? Open in Web Editor NEWA code sniffer for environment variables NOT declared in .env files
Home Page: https://packagist.org/packages/backdevs/dotenv-sniffer
License: MIT License
A code sniffer for environment variables NOT declared in .env files
Home Page: https://packagist.org/packages/backdevs/dotenv-sniffer
License: MIT License
As the title states, the README should be updated to include examples using the backdevs/desniff
image and have it as the preferred method of using the tool.
Also, a PHAR usage example would be nice.
As the tool statically analyzes PHP source code, it can very well be containerized to be easier to integrate into CI/CD pipelines.
It will also allow projects that have dependency conflicts with the tool to still use it.
backdevs/desniff
(should probably be pushed to github's registry too due to recent changes Docker's organizations pricing scheme)Dockerfile
to projectsquizlabs/php_codesniffer
as a dev requirementbackdevs/coding-standard
as a dev requirement (not yet available)phpcs.xml
file that uses the backdevs coding-standardphpcs
job in the tests.yml
workflow that runs vendor/bin/phpcs
Note: As backdevs/coding-standard
is still a WIP this issue will have to wait.
Similar to what phpunit
, phpcs
, phpstan
etc. are doing, a desniff.yml
configuration file should be supported and automatically loaded if present and require CLI arguments only if they're not defined in the config file.
The file should support all the existing CLI arguments.
We should provide a default configuration file that contains the default values for all the existing CLI arguments:
<env-file>
- .env.example
<paths>
- ./config
--fail-code
- 1
--warn-with-default
- false
--ansi
- true
--quiet
- false
The default configuration file should be generated using an init
command:
./vendor/bin/desniff init
The configuration file should be automatically loaded if present but also the user should be able to provide it using an argument (-c | --config
and --fail-code
should become -f
:
./vendor/bin/desniff -c desniff.ci.yml
As the title says, the project will be renamed to laravel-dotenv-sniffer
.
Things to update:
README
urls & titlecomposer.json
urllaravel
projects at the momentSince GitHub actions using node 16 have been deprecated, we should use actions' latest versions.
References:
This can (should?) be done similar to what phpunit
or phpcs
do with their configuration files (phpcs.xml
and phpunit.xml
).
We can have a desniff.yml
file that can look something like this:
excluded_files:
- ./config/view.php
- ./config/queue.php
excluded_vars:
# config/app.php
- ASSET_URL
# config/view.php
- VIEW_COMPILED_PATH
# config/broadcasting.php
- PUSHER_APP_KEY
- PUSHER_APP_SECRET
- PUSHER_APP_ID
- PUSHER_APP_CLUSTER
box.json.dist
configuration file for box-project/boxbackdevs/box
Docker image to "compile" the tool to a phar
during the CI
workflowBeing that this project is also distributed as a composer package, composer.lock
doesn't really make much sense.
It'll also reduce dependabot
PRs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.