xbmc / addon-check

Automatic checks for new repository submissions
GNU General Public License v3.0
52 stars 41 forks source link

Option to export found issues using Checkstyle #46

Open enen92 opened 6 years ago

enen92 commented 6 years ago

Checkstyle is an XML output format for source-code checkers. This will provide interoperability with both IDEs and editors that expect code suggestions in checkstyle format, as well as other continuous code quality platforms (e.g. personal instances of sonarqube). Checkstyle output format is built into many linters found out there (see for instance gometalinter: https://github.com/alecthomas/gometalinter#checkstyle-xml-format).

Exposing found issues in Kodi addons using a common standard will certainly help the development of plugins for most of existing IDEs.

This is not a high priority requirement, just food for though. At least keep the idea in mind while developing the tool further so it will not require drastic architectural changes if someone wants to implement this. Cheers

razzeee commented 6 years ago

Not sure, seems to be used for jenkins and not much more? At least from what I was finding some days ago.

I then looked into how to write Visual Studio Code plugins. Which would involve a local javascript server, as they don't support other languages right now, others are planned. Not sure if wrapping python would even be an option.

mzfr commented 6 years ago

I personally use Sublime Text and other people might use different editors and creating a linter for every editor would be tough.

Perhaps we should look into creating a linter that can somehow be integrated with the Language Server Protocol? This will mean that we just have to write code once (hopefully in Python) and we'd use existing LSP plugins for each editor to get linting capabilities!

Let me know if this sounds okay, and I'll research this a bit more!

razzeee commented 6 years ago

That sounds like the thing I was looking for. Please do some research, but don't get into deep. Might be (a very interesting) gsoc project on it's own.

razzeee commented 6 years ago

@enen92 do you also agree that the language server protocol would be the better way?

enen92 commented 6 years ago

@Razzeee I am not familiar with it. From what I have seen it looks too complex for what we want to achieve, it almost feels like we are reinventing the wheel. We are not defining a new language and most of those features are already available for python. Even when developing for kodi, having kodistubs in site-packages already gives auto-completion as well. IMHO the idea would be to export the issues via a common data model that could later be consumed (and processed) by third party projects. That's why I suggested checkstyle which basically is the only one I know about.