Skip to content

feat!: separate parsing from linting #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

neilime
Copy link
Owner

@neilime neilime commented Jun 16, 2025

This feature is a major rework of php-css-lint, it introduces the separation between parsing css and lint css.

  1. Tokenizer is in charge of parsing the CSS content and generating tokens
  2. Linter is checking the generated tokens.

Performance has been considered, as the irs a massive usage of Generator

Moreover, thanks to this improvements, we can now parse properly:

  • at-rule dedicated properties.
  • Nested blocks
  • Non-complete declaration

@neilime neilime self-assigned this Jun 16, 2025
@neilime neilime linked an issue Jun 16, 2025 that may be closed by this pull request
@neilime neilime force-pushed the 118-linter-fails-with-font-display-and-unicode-range branch 6 times, most recently from 047d6ab to 23ea29f Compare June 17, 2025 09:05
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

Attention: Patch coverage is 95.49550% with 50 lines in your changes missing coverage. Please review.

Project coverage is 95.89%. Comparing base (dcc2001) to head (2c99f37).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/CssLint/Tokenizer/Tokenizer.php 88.65% 16 Missing ⚠️
src/CssLint/TokenLinter/IndentationTokenLinter.php 86.66% 8 Missing ⚠️
src/CssLint/Token/BlockToken.php 60.00% 6 Missing ⚠️
src/CssLint/TokenLinter/AtRuleTokenLinter.php 94.54% 6 Missing ⚠️
src/CssLint/Linter.php 91.22% 5 Missing ⚠️
src/CssLint/Tokenizer/Parser/PropertyParser.php 92.06% 5 Missing ⚠️
src/CssLint/Token/AbstractToken.php 96.55% 2 Missing ⚠️
src/CssLint/Tokenizer/Parser/SelectorParser.php 97.56% 1 Missing ⚠️
src/CssLint/Tokenizer/Parser/WhitespaceParser.php 97.67% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #123      +/-   ##
============================================
+ Coverage     95.38%   95.89%   +0.51%     
- Complexity      209      417     +208     
============================================
  Files            11       29      +18     
  Lines           520     1292     +772     
============================================
+ Hits            496     1239     +743     
- Misses           24       53      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@neilime neilime force-pushed the 118-linter-fails-with-font-display-and-unicode-range branch 2 times, most recently from 8748458 to a550f32 Compare June 17, 2025 10:12
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
@neilime neilime force-pushed the 118-linter-fails-with-font-display-and-unicode-range branch from a550f32 to 2c99f37 Compare June 17, 2025 10:29
@neilime neilime merged commit 6f1b011 into main Jun 17, 2025
6 checks passed
@neilime neilime deleted the 118-linter-fails-with-font-display-and-unicode-range branch June 17, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linter fails with font-display and unicode-range
1 participant