Code Monkey home page Code Monkey logo

laravel-dotenv-sniffer's People

Contributors

bogdannbv avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

laravel-dotenv-sniffer's Issues

Docker containerization

For simpler use in CI/CD pipelines, the tool should be containerized

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.

What needs to be done:

  • Create docker hub repository backdevs/desniff (should probably be pushed to github's registry too due to recent changes Docker's organizations pricing scheme)
  • Add Dockerfile to project
  • Add gitlab workflow to build and push the image to the registry

Add PHP_CodeSniffer

What needs to be done:

  • Add squizlabs/php_codesniffer as a dev requirement
  • Add backdevs/coding-standard as a dev requirement (not yet available)
  • Add phpcs.xml file that uses the backdevs coding-standard
  • Add phpcs 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.

Add support for a `desniff.yml` configuration file

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

Project rename to laravel-dotenv-sniffer

As the title says, the project will be renamed to laravel-dotenv-sniffer.

Things to update:

  • Repository name
  • Packagist package?
  • README urls & title
  • composer.json url

Better README

A better, nicer README is needed

Needs:

  • Nicer header
  • Notice about how it's best suited for laravel projects at the moment
  • Better examples

Add possibility to provide a list of excluded files or variables

Depends on #113

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

Distribute as PHAR

To improve compatibility and ease of use

  • This tool should be distributed as a PHAR
  • #3 should use the PHAR

What needs to be done

  • Add a box.json.dist configuration file for box-project/box
  • Use backdevs/box Docker image to "compile" the tool to a phar during the CI workflow

Remove composer.lock

Being that this project is also distributed as a composer package, composer.lock doesn't really make much sense.

It'll also reduce dependabot PRs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.