Skip to content
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

New Feature Request: Command Line Linter for DSL #41

Open
amp5208 opened this issue Dec 2, 2016 · 7 comments
Open

New Feature Request: Command Line Linter for DSL #41

amp5208 opened this issue Dec 2, 2016 · 7 comments

Comments

@amp5208
Copy link

amp5208 commented Dec 2, 2016

Narrative:

As a Jenkins DSL user, I want to be able to lint my DSL job updates offline, so that I can both script my static code analyses for infrastructure code and evaluate my code from behind company firewall securely.

Acceptance Criteria:

Scenario: Export Linter to command line tool
User: Infrastructure engineer or equivalent automation
GIVEN a DSL script
WHEN I run the DSL Playground linter via command line
THEN I want to validate the physical structure of my DSL job in a way that mimics the results/output of the web application UI

Scenario: Checking Groovy imports for DSL
User: Infrastructure engineer or equivalent automation
GIVEN: a DSL script AND Groovy imports included
WHEN I run the DSL Playground linter via command line OR via UI
THEN I want to validate the physical structure of my DSL job even if it utilizes downstream Groovy dependencies
@ayr-ton
Copy link

ayr-ton commented Dec 7, 2016

It would be great, as sometimes we have class definitions that throws errors, as they are not imported during the check since we check only one file at once and not his dependencies.

@ayr-ton
Copy link

ayr-ton commented Dec 7, 2016

@amp5208 Could we add an acceptance criteria for checking the imports as well? Let's pair on this? (:

@amp5208
Copy link
Author

amp5208 commented Dec 7, 2016

yes! I will add that. we can definitely pair.

@amp5208
Copy link
Author

amp5208 commented Dec 7, 2016

@ayr-ton : Please review my updated Use case and provide changes as necessary before we begin changes.

Also, in terms of a command line tool option, do you have experience or the ability to push the command line tool binary to a public package repository available for distribution? e.g., NPM, Homebrew, apt-get, yum, Maven Central, etc.? This will be key to making this command line feature available for others out-of-the-box

@sheehan
Copy link
Owner

sheehan commented Dec 8, 2016

Are you just wanting to validate syntax? I have a gradle example that provides that https://github.com/sheehan/job-dsl-gradle-example#testing

@ayr-ton
Copy link

ayr-ton commented Dec 8, 2016

@sheehan I will review this in a moment and let you know if fit the feature request \o/

@amp5208
Copy link
Author

amp5208 commented Jun 1, 2017

@sheehan : That might be a fine enough use case. Let me run it against one of my DSLs and let you know if it works; i will close the issue if your gradle task works.

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

No branches or pull requests

3 participants