Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Support for CI Integration #47

Open
asciidisco opened this issue Apr 12, 2013 · 6 comments
Open

Support for CI Integration #47

asciidisco opened this issue Apr 12, 2013 · 6 comments

Comments

@asciidisco
Copy link

Hey,
prelude -> I'm a JavaScript guy who rarely touched ruby before, so unfortunately I'm not able to implement this on my own :(

Basically, what CSSCSS does, can be considered as Copy & Paste Detection (http://en.wikipedia.org/wiki/Duplicate_code) there are other tools for other languages that can detect & report such issues (https://github.com/sebastianbergmann/phpcpd).

Those tools normally can output the results in a special XML format, that can be consumed by various CI Tools (like Jenkins for example).
They mostly convert it to some nice diagrams & can also fail the build if the
rate of copy-pasted code is above a user defined value.

The defacto standard pmd-cpd XML output would look like this:

<?xml version="1.0" encoding="utf-8"?>
<pmd-cpd>
    <duplication lines="" tokens="5">
        <file line="96" path="/Users/whatever/myproject/css/main.css"/>
        <file line="159" path="/Users/whatever/myproject/css/main.css"/>
        <codefragment><![CDATA[" display: block;
            margin: 20px;
         "]]></codefragment>
    </duplication>
    <duplication lines="" tokens="4">
        <file line="24" path="/Users/whatever/myproject/css/main.css"/>
        <file line="199" path="/Users/whatever/myproject/css/main.css"/>
        <file line="312" path="/Users/whatever/myproject/css/main.css"/>
        <codefragment><![CDATA[" display: none;
            margin: 50px;
         "]]></codefragment>
    </duplication>
    <duplication lines="" tokens="3">
        <file line="64" path="/Users/whatever/myproject/css/main.css"/>
        <file line="111" path="/Users/whatever/myproject/css/main.css"/>
        <codefragment><![CDATA[" h1.my.super.overqualified.selector"]]></codefragment>
    </duplication>
</pmd-cpd>

What do you think, could that reporter be easily integrated into the CSSCSS?
I think a lot people would benefit from this.

@zmoazeni
Copy link
Owner

I think this is a great idea. Especially if we only have to support one format.

Sent from my iPhone

On Apr 12, 2013, at 9:16 AM, Sebastian Golasch [email protected] wrote:

Hey,
prelude -> I'm a JavaScript guy who rarely touched ruby before, so unfortunately I'm not able to implement this on my own :(

Basically, what CSSCSS does, can be considered as Copy & Paste Detection (http://en.wikipedia.org/wiki/Duplicate_code) there are other tools for other languages that can detect & report such issues (https://github.com/sebastianbergmann/phpcpd).

Those tools normally can output the results in a special XML format, that can be consumed by various CI Tools (like Jenkins for example).
They mostly convert it to some nice diagrams & can also fail the build if the
rate of copy-pasted code is above a user defined value.

The defacto standard pmd-cpd XML output would look like this:

What do you think, could that reporter be easily integrated into the CSSCSS? I think a lot people would benefit from this.


Reply to this email directly or view it on GitHub.

@asciidisco
Copy link
Author

Nice to hear :)
As usual, there are a few formats out there, but from my experience pmd-cpd is the one that
has the best support out there.

@verpixelt
Copy link

I'm thinking about output into a HTML template which obviously could be personalised with CSS but I don't know where to start. Did you already investigate in this? I would like to push this forward. Please let me know if something exists where I contribute.

@zmoazeni
Copy link
Owner

@verpixelt Nothing has been done for this either.

@verpixelt
Copy link

Okay. I'm looking right now for a few Devs who will help me build something ;)

@verpixelt
Copy link

We did a little thing, called it csscssbeauty and you can find it right here: https://github.com/garthenweb/csscssbeauty
At this moment it's nothing fancy, but you get your output in a simple HTML template which will live reload while your changing things in your editor of choice. We will put in more time and effort soonish.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants