-
Notifications
You must be signed in to change notification settings - Fork 84
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
Document output schemas #322
Comments
Also: "Also, curious when the locations array would contain anything but one element." "I don't want my second question to get lost, though. Is it possible, and if so in what cases would the locations array not contain one element? Likewise for the XML output, as that would be important to define the minOccurs and maxOccurs attributes in a schema as well as a description of what the element is." |
I had a look into the location structure. In XML it seems that it's possible to get multiple location elements for an issue. The code is:
(the JSON code is similar) So, I think @ryaneberly might have to have to look into that, sorry. cc: @KamasamaK |
Discussion in #318 leaning towards not touching |
@KamasamaK Just to let you know, we've done #323 and #330 - therefore you'll find that CFLint XML, Json and Text output now have a few more counters/stats. Findbugs hasn't been changed. (all in dev branch, which we'll release 1.2.0 from in the next few days hopefully) |
I am under the impression after fixing this issue |
I recommend using JSON Schema Store for the JSON schema. |
@KamasamaK Sure - it'd be great if you could create a JSON Schema for us to test. When it's all working, more than happy to send a Pull Request to Schema Store with it (or you can do it yourself then). |
@TheRealAgentK I'll give it a shot, but I will have to infer some of the meanings. For example, the top-level I've changed my mind about using JSON Schema Store for the output right now. This is due to any potential breaking changes as a result of Issue #331. Breaking code compatibility is one thing, but I would want to minimize the possibility of having |
I'm not sure if #331 would necessarily change the output formats. I created the ticket to refactor the internal workings of how CFLint produces the various output formats because it's currently using different ways to get to the same point. |
@KamasamaK Re your other question (top-level message vs. top-level code) --- I'm not sure what the intention was when it was built. Maybe @ryaneberly can shed some light into it? Regardless though - there's no reason we can't change it. For instance in findbugs XML, I don't do that, the built-in CFLint XML currently has it though. So, in hindsight - maybe #331 WILL change a bunch of things in the output formats :-) |
@TheRealAgentK You're right, it does say it's specific to the engine. Although I think consistency of the data should also be a goal (and a consequence) of having more cohesive serialization. For example, the text output has Maybe the goal isn't to make them identical, but I think at least naming should be consistent. It's strange to have a field in the text output be |
Yeah, I agree - they should be consistent and we'll make sure of that when I do #331 then at some point. I'd still think it'd be useful to document the current "schemas" as of now and provide that info to people. |
I have the XML and JSON schemas finished for the v1.1.0 formats. I notice that the output of the |
Will change JSON (see #323), CFLint XML only had some minor count and timestamp additions in 1.2.0 and Findbugs is using the proper bugcollection.xsd anyway. |
I've put schemas for the JSON and XML in |
Update to match change in Issue #383 |
@KamasamaK just saw this now - you hadn't updated the schema yet in the repo though? I just changed timestamp to type number and pushed/merged it in my PR. |
It's done now. I'm not sure how to create a proper schema for the text output, though. Any suggestions? Otherwise, I guess this issue can be closed unless someone finds something to change with the current result schemas. But really, the schemas will always be a work-in-progress to match changes with the generated result formats. |
@KamasamaK Yeah, to be frank, the text output is just what it is. I don't think - similar to the HTML report - that it'd need a schema or any detailed documentation. |
HTML would be too complicated, I think. I will probably add something for the text as a code block in the README. |
Please document the different output schemas (e.g. JSON, XML, text)
(was part of #318 from @KamasamaK - created a separate issue)
The text was updated successfully, but these errors were encountered: