Coder Social home page Coder Social logo

neilime / php-css-lint Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 4.0 593 KB

CSS Linter for PHP

Home Page: https://neilime.github.io/php-css-lint/

License: MIT License

PHP 96.86% CSS 1.07% Dockerfile 0.47% Makefile 1.61%
php lint css-linter css composer

php-css-lint's Introduction

php-css-lint's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar girgias avatar hugopeek avatar neilime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

php-css-lint's Issues

Close down API

Most methods/properties are declared as protected which I don't think should be the case as most of them work on its self and therefore should be declared private.

I would also suggest to make the Linter class final and to add the private visibility to class constants (Available as of PHP 7.1, which this library already targets).

Specify file indentation

I'm working with files that mostly have tabbed indentation. After digging through the code, I wasn't able to find a way of specifying the type of indentation in a file.

Is there such an option, and if not - will it be much of a hassle to implement?

Take CSS in from STDIN

Hey,

I would like a way to potentially take input from STDIN. As there is some PHP involved in the generation of my styles, I cannot reliably run automated tests on them using your library, however I like the fact that it is in PHP (and thus in composer).

Is there any way support for this option could be added?

Fails when testing with what appears to be a valid file

I've been trying to find a good PHP linter that checks if a CSS string has valid syntax. So far, this is the only one that has gotten the job almost right. My tests are done on the official stylesheet of WordPress' twentyseven theme - style.css. It returns a lot of errors, which I imagine shouldn't be flagged as such.

Here's the same file tested with the w3c's validator - link.

Tested with latest version from master (before and after indentation update).

Commandline modifiers for easy CI integration

Currently if you want to allow tabs on the files, you need to create your own script to run the linter.

It would be nice to have a command line parameter to weak this sor of configurations.

This would make it easier to use this script in a CI environment

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.