Giter Site home page Giter Site logo

coala / coala-html Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 41.0 4.15 MB

Interactive website generator using results from coala

License: GNU Affero General Public License v3.0

JavaScript 45.69% CSS 8.84% HTML 14.40% Python 27.22% Shell 3.86%
angular node python3

coala-html's Introduction

https://cloud.githubusercontent.com/assets/5716520/24838296/a9cf5f04-1d45-11e7-855c-47b816ce1e09.png

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." โ€• John F. Woods


Linux Build Status Windows Build status macOS Build Status codecov.io Documentation Status AGPL OpenHub


coala provides a unified interface for linting and fixing code with a single configuration file, regardless of the programming languages used. You can use coala from within your favorite editor, integrate it with your CI, get the results as JSON, or customize it to your needs with its flexible configuration syntax.

coala supports popular programming languages including Python, C/C++, Java, JavaScript, CSS, and several others out of the box.

Install coala | Get Involved | Chat | Roadmap | Blog | Twitter

coala-html's People

Contributors

abdealiloko avatar adtac avatar anshumanv avatar blazeu avatar hemangsk avatar igorwwwwwwwwwwwwwwwwwwww avatar manankalra avatar marian-ald avatar mixih avatar monsij avatar prashant0598 avatar sahilarora535 avatar sils avatar sotanishy avatar thegypsydev avatar tushar-rishav avatar yukiisbored avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coala-html's Issues

Add testing framework

Until now although travis is enabled we do not use unittests.

We need to decide on which framework to use and to also set it up.

Run bower install during pip install

Presently, bower installs dependencies when user runs coala-html first time. We should implement this installation process when user installs coala-html via pip.

Do not modify <pre> to be inline

Currently we're using ng-repeat to show each line one as a time. We've modified the <pre> tag to be inline also. It's better to use JS to merge the whole code block we wish to show and dump it into a pre tag.

Highlighting (and other codes possibly) will be confused as it won't know how to parse codes line by line

For example:
If the highlighter is asked to match brackets it wont be able to find it ?

Show Diffs

Would be nice to show diffs. Similar to how gitmate shows it in github right now (Possible with an option to show or disable them)

Show file paths in Results

We should also display file paths along with errors and affected lines in Results tab. Having that will help users to narrow down the search for errors.

Do we want a file browser with inline messages ?

In my opinion we should have:

  • Results tab which shows the Results in the current format.
  • Files tab which shows a list of files with some stats on the side (Number of results and which bears ran on them) and each file can open with inline results

I personally like the Files tab more - because I find it more user friendly.

Add CI

We probably want a little circleci script that at least builds the website? Ideally some tests should be run.

@tushar-rishav any experience with that?

Remember selected theme

It'd be nice to save the user's choice for theme. Next time when he open the browser, he gets the default theme as the saved one.
I think localstorage could be useful here.

Search in Results

I'm not quite sure what this search module is supposed to be doing.

When I type in g - 3rd result goes away an 2 remain. But only the first result has a g in the sys.argv line ...

Where does it search ? Where should it be searching ? Do we want an advanced search ?

  • I think it'd be better to have a series of toggle buttons with all severities (INFO, NORMAL, MAJOR) to show/hide each of them.
  • It's be nice to make a multi select choice box (from chosen library maybe?) which allows us to choose which bears to show.
  • Glob based search for files ? Along with a line range search
  • And a search box for test based (for result messages OR code line that's affected itself)

Use grunt/gulp

Grunt and gulp are awesome tools which help making websites lean and also to run them locally easily.
Would be good to use either of them

Make a service to parse coala-json output

Currently we hardcode the project path in controllers and we have local functions.
Would be much nicer to use a service which parses this json, creates models and gives that out.

It're be reusable in multiple controllers

Add config tab

There can be a tab for LogMessages (for #15)
And another tab for "settings" which has the coafile

Group results based on the file they belong to

Currently, irrespective of a file the results belong, they're being shown all at once. It'd look like mess when we have results for say 20 different files or even more and each file having 10 source ranges. Imagine, user will have to scroll all the way down to go through all the files' results.
Now we can do two things to avoid this:

  1. Display only file names in result tab. Clicking on the file names would display all the results for corresponding file. Clicking on another file would close the results for previous one and open for the current file. Can be done with simple toggle.
  2. Use pagination in case when number of files are large.

IMO 2nd option seems sustainable

cc @AbdealiJK @sils1297

Demo on gh-pages

Do we want a demo in gh-pages of this site ?

As far as I understand that's just a simple thing where we put in 2 extra commits:

  • Remove bower_components from gitignore
  • Add bower_components folder and push

And we can keep rebase-ing master on this when we wish to upgrade it. The gitignore will be updated once in a while and will cause conflicts, but that's fine ...

coala html binary

From @AbdealiJK on February 28, 2016 5:57

So, as I see it the coala html binary needs to do three things:

Install coala-html angular app via bower. Also install the bower dependencies.

  • run coala and dump the results in json format to a particular file if it doesn't exists else update it. This file shall be used by Angular app.
  • create file.json if it doesn't exists else update it.
  • Finally, create a server and open the file. This can have some flexibility. User can decide whether to launch the webpage immediately after running coala-html or maybe just update/create the files.

Fixes #31

We probably want an arg to just create the server / open the last result too.

Copied from original issue: coala/coala#1733

Add Gemfile

To test locally github pages has a ruby package.

Add a Gemfile which will install this and run the site for you locally

Create a model for Result

It's better to use ngModel and make a model for results
This will allow us to have helper functions inside the model - like get_results_of_file() or general search queries too.

suggestions

just change the font family to monospace for code and sans-serif for the rest... it would be a good change for now.

from Ankit (he made e.g. gitmate.io)

Move angular files to separate folder

The current file structure in master should be changed so that angular app can be distributed under python package. This issue would just create a new folder containing old files from master branch.
Later necessary python files will be added in #31 to make a complete python package.

CC @AbdealiJK

Add page loader

Showing a page loader would be nice to have.
Scenario: Async

Use bower

Don't keep static files - rather use bower to manage static dependencies for you

Ctrl+C doesn't abort cleanly

How am I supposed to stop the server? Best you catch Ctrl+C and clean up. Otherwise I get "Address already in use" repeatedly which is annoying.

Use google-code-prettifier

google-code-prettifier works well with bootstrap for one.
It also has support for line numbers and so on which is something we want (as we're custom adding line numbers right now in highlight.js).

Consider minifying the angular package

We could minify the js, html etc related to angular files before packaging.
Pros:

  • Significant reduce in size and hence the pip package.

Cons

  • Users might have to deminify if they wish to modify the angular code at their side. Otherwise, it won't be readable at all.

As an user, I am inclined towards Pros as the reduction in size would be more than 50%. it would be like saving 20-30 KBs. I agree it's very small size but again why not save it if we could.
As a hacker, people might wanna customise the application and use it as per their needs. Not sure about its possibility.

Thoughts?
CC @Uran198 @AbdealiJK @sils1297

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.