csscomb / csscomb.js

CSS coding style formatter
http://csscomb.com/
MIT License
3.28k stars 458 forks source link

parsing output from csscomb #451

Open AbdealiLoKo opened 8 years ago

AbdealiLoKo commented 8 years ago

Hi,

Im trying to use csscomb and parse the output so that i can detect the line changes (before applying it). I was looking for some way to get the fixed file from csscomb through stdout.

Couldn't find any method to do that - could you help me out ?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

sudheesh001 commented 8 years ago

I was just about to post this. Thanks for posting it @AbdealiJK :+1:

To the owners/contributors:

Basically as AbdealiJK mentioned we're looking for getting the output of csscomb over a specific file as the stdout. At the same time it'd be greater to make the error messages more easily parsable in case there's a syntax error in the css file. As of now it abruptly flags an error in -v and without -v it runs csscomb over the file but doesn't make any changes.

Tracking issue: https://github.com/coala-analyzer/coala/issues/1398

sodatea commented 8 years ago

@AbdealiJK This is not possible with the current code base. However you can use the Node.js interface comb.processString to get the expected output without changing the file.

sodatea commented 8 years ago

@sudheesh001 I'd surely like to add this feature to csscomb. But for now I am busy fixing bugs.

Might be able to begin dealing with this feature in a month or two. And any help would be appreciated :smile:

tonyganch commented 8 years ago

Actually, if you pass not a file name but file content to csscomb via stdin, it should output the result to stdout: https://github.com/csscomb/csscomb.js/blob/dev/src/cli.js#L29 Though I believe stdin may be a bit broken right now: #351

(I'm going through mail in reverse date order, so sorry for replying to PR first :octopus:)

atb00ker commented 5 years ago

Hi, I am trying to achieve the same and i have been unsuccessful so far! :disappointed: If there is any update on this it would be a great help. Thank You. :smile: