Skip to content
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

Fix css EOF duplicate errors #4816

Merged
merged 3 commits into from
Jun 8, 2022
Merged

Fix css EOF duplicate errors #4816

merged 3 commits into from
Jun 8, 2022

Conversation

BenSouchet
Copy link
Contributor

Issue #4809 | Annotations: duplicate annotations in CSS mode

This Pull request fix a bug with the CSS Parser (file csslint.js), the bug is simple :
If a declaration is open { and after that the parser encounter the end of the file EOF it will throw twice a wrong error (Unexpected token 'null' at line 3, col 1.).

I imagine this edge case has never been considered, and therefore taken into account in the code.

Before / After

Before:
Before

After:
After

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #4816 (1e4f9a2) into master (57ded09) will increase coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4816      +/-   ##
==========================================
+ Coverage   71.12%   71.16%   +0.03%     
==========================================
  Files         554      554              
  Lines       55711    55715       +4     
  Branches    10419    10420       +1     
==========================================
+ Hits        39623    39648      +25     
+ Misses      16088    16067      -21     
Flag Coverage Δ
unittests 71.16% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/ace/mode/css/csslint.js 33.19% <0.00%> (-0.02%) ⬇️
lib/ace/mouse/default_gutter_handler.js 25.96% <0.00%> (-0.78%) ⬇️
lib/ace/layer/text.js 90.81% <0.00%> (-0.30%) ⬇️
lib/ace/tooltip.js 43.75% <0.00%> (+0.27%) ⬆️
lib/ace/editor.js 81.63% <0.00%> (+1.90%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57ded09...1e4f9a2. Read the comment docs.

lib/ace/mode/css/csslint.js Outdated Show resolved Hide resolved
@BenSouchet
Copy link
Contributor Author

By the way there is lot of odd elements in the csslint.js file, like these empty else statement:


If I had motivation and time I would try to fix a bit the file, but currently I will focus on fixing bugs I encounter.

@BenSouchet BenSouchet requested a review from andrewnester June 4, 2022 15:27
@andrewnester
Copy link
Contributor

I've only realised that this change is made in csslint code which is a 3rd party library. Ideally we would rather update the library and maybe the fix is there but the library is not maintained anymore. I'll take a closer look at the change and will leave my comments

@andrewnester andrewnester merged commit 48176f6 into ajaxorg:master Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants