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

Provide Chocolatey Language Server support #70

Open
29 of 47 tasks
gep13 opened this issue Jan 27, 2019 · 26 comments
Open
29 of 47 tasks

Provide Chocolatey Language Server support #70

gep13 opened this issue Jan 27, 2019 · 26 comments
Labels
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Jan 27, 2019

Rules that should be implemented:

Requirements

Also, rules added as part of PR 184:

Guidelines

Suggestions

Notes

@gep13 gep13 added the Feature label Jan 27, 2019
@gep13 gep13 added this to the 0.8.0 milestone Feb 13, 2019
gep13 added a commit that referenced this issue Feb 13, 2019
- This still needs some work, but it is at least working now
- Single rule for templated values has been implemented
- Question remains over how to get server into file system
- Question remains over sending entire file to server
@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

@mkevenaar @steviecoaster @AdmiringWorm if any of you are interested in helping with the validator rules within the VSCode extension, I have now checked in a working sample of the templated variables being highlighted as errors.

In order to get this to work on your machine, you will have to do the following:

image

@gep13 gep13 changed the title Provide nuspec language support Provide Chocolatey Language Server support Feb 13, 2019
@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

@mkevenaar @steviecoaster @AdmiringWorm I have updated the original comment with the initial set of rules that I think should be applied. I would suggest, assuming that you are interested in helping, that we take 1 rule at a time. i.e. 1 rule per PR.

@mkevenaar
Copy link
Member

@gep13 do you want to implement the rules from chocolatey/package-validator#184 also?

@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

@mholo65 I have added the initial implementation of this into the Chocolatey VSCode Extension. I haven't included the schema validation just yet, as there is a question over where exactly that schema is going to reside, so leaving that out for now, but I will add it in once everything is in place. Thanks again for all your help on getting this started!

@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

@mkevenaar said...
do you want to implement the rules from chocolatey/package-validator#184 also?

Yes, that makes sense. If you can list all the ones that "will" be included, I will get them added to the list above

@mkevenaar
Copy link
Member

mkevenaar commented Feb 13, 2019

@gep13 done:

I have removed the checklist.

@bjorkstromm
Copy link
Contributor

@gep13 great work! As for the Schema, I’d recommend that you use an unique namespace instead of the NuGet’s NuSpec namespace. If I understood correctly, you have a couple of additional elements that’s not available in the NuGet NuSpec.

@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

DiagnosticSeverity.Error:

image

DiagnosticSeverity.Hint: (Notice the little three dots)

image

DiagnosticSeverity.Information:

image

DiagnosticSeverity.Warning:

image

@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

Based on the above, I think the mapping between the rule types should be the following:

DiagnosticSeverity.Error -> Requirement
DiagnosticSeverity.Warning -> Guideline
DiagnosticSeverity.Information -> Suggestion
DiagnosticSeverity.Hint -> Note

Thoughts? @mkevenaar @steviecoaster @AdmiringWorm

@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

@mholo65 said...
As for the Schema, I’d recommend that you use an unique namespace instead of the NuGet’s NuSpec namespace. If I understood correctly, you have a couple of additional elements that’s not available in the NuGet NuSpec.

That is exactly the question that I was referring to 😄

gep13 added a commit that referenced this issue Feb 13, 2019
(GH-70) Validation for description element in nuspec file
gep13 added a commit that referenced this issue Feb 13, 2019
- That way, all validations can be loaded at once
- Based on conversation in GitHub issue
@gep13
Copy link
Member Author

gep13 commented Feb 13, 2019

@AdmiringWorm @mkevenaar I have taken a stab at refactoring the code to use a similar system to package validator. Now, all rules will be loaded based on whether they come from INuSpecRule. Seems to work, but I will do some more testing.

gep13 pushed a commit that referenced this issue Feb 14, 2019
- Added UrlValidValidation rules for all Url elements.
- Added generic url_is_valid function
gep13 added a commit that referenced this issue Feb 14, 2019
- Switch to using an extension method
- Corrected whitespace
gep13 added a commit that referenced this issue Feb 14, 2019
* pr98:
  (GH-70) Minor tweaks
  (GH-70) Provide Chocolatey Language Server support
@mkevenaar
Copy link
Member

To make sure that @AdmiringWorm, @steviecoaster, @gep13 and I are not working on the same rule, @gep13 suggested to update the issue; So here goes:

I am going to work on:

  • NuspecEnhancementsMissingSuggestion.cs

gep13 added a commit that referenced this issue Feb 19, 2019
* pr101:
  (GH-70)  Added validation if URL is SSL capable.
gep13 pushed a commit that referenced this issue Mar 9, 2019
Merge pull request #164 from AdmiringWorm/feature/deprecated-pkg-rule

(GH-70) Implemented rule to validate deprecated package have dependency
gep13 added a commit that referenced this issue Mar 9, 2019
 (GH-70) Implemented rule to check if licenseUrl is set when requireLicenseAcceptance is true
gep13 pushed a commit that referenced this issue Mar 9, 2019
Merge pull request #165 from AdmiringWorm/feature/license-url-missing

 (GH-70) Implemented rule to check if licenseUrl is set when requireLicenseAcceptance is true
gep13 added a commit that referenced this issue Mar 9, 2019
(GH-70) Implemented validation rule to check if a package id ends with .config
gep13 pushed a commit that referenced this issue Mar 9, 2019
Merge pull request #166 from AdmiringWorm/feature/package-id-config

(GH-70) Implemented validation rule to check if a package id ends with .config
gep13 added a commit that referenced this issue Mar 9, 2019
(GH-70) Implemented validation rule to check if package id contains pre-release tags
gep13 pushed a commit that referenced this issue Mar 9, 2019
Merge pull request #167 from AdmiringWorm/feature/package-id-prerelease

(GH-70) Implemented validation rule to check if package id contains pre-release tags
gep13 added a commit that referenced this issue Mar 9, 2019
(GH-70) Implemented rule to check if a project url have been specified
gep13 pushed a commit that referenced this issue Mar 9, 2019
Merge pull request #168 from AdmiringWorm/feature/project-url

(GH-70) Implemented rule to check if a project url have been specified
gep13 added a commit that referenced this issue Mar 9, 2019
(GH-70) Implemented rule to check if tags contains a comma
gep13 pushed a commit that referenced this issue Mar 9, 2019
Merge pull request #169 from AdmiringWorm/feature/tag-commas

(GH-70) Implemented rule to check if tags contains a comma
gep13 added a commit that referenced this issue Mar 9, 2019
(GH-70) Implemented validation for tags being supplied
gep13 pushed a commit that referenced this issue Mar 9, 2019
Merge pull request #170 from AdmiringWorm/feature/tags-not-empty

(GH-70) Implemented validation for tags being supplied
@AdmiringWorm
Copy link
Member

AdmiringWorm commented Mar 9, 2019

hmm, been thinking of the encoding check guideline.
Unless there is some way to hook into the save event of a file, I think this is very unlikely that we are able to implement correctly in the language server.

EDIT: Seems like there is, I completely missed that.
Would still require quite some refactoring of the code to implement it successfully (I think).
I suggest we leave that guideline out of the list for now.

@AdmiringWorm
Copy link
Member

I'll be looking into creating a rule for the missing suggestion (The one about icon url being svg or png).

@AdmiringWorm
Copy link
Member

@mkevenaar I just pushed the note rule I had been working on. I used the rule code choco3001.

gep13 added a commit that referenced this issue Mar 12, 2019
(GH-70) Implemented validation rule to check if icon url is svg or png
gep13 pushed a commit that referenced this issue Mar 12, 2019
Merge pull request #174 from AdmiringWorm/feature/icon-extension

(GH-70) Implemented validation rule to check if icon url is svg or png
gep13 added a commit that referenced this issue Mar 12, 2019
(GH-70) Implemented validation for id with underscore rule
gep13 pushed a commit that referenced this issue Mar 12, 2019
Merge pull request #175 from AdmiringWorm/feature/id-underscore

(GH-70) Implemented validation for id with underscore rule
gep13 added a commit that referenced this issue Mar 16, 2019
…chMaintainerNote

(GH-70) Validates that the author does not match the maintainer
gep13 pushed a commit that referenced this issue Mar 16, 2019
Merge pull request #176 from mkevenaar/feature/GH-70/AuthorDoesNotMatchMaintainerNote

(GH-70) Validates that the author does not match the maintainer
steviecoaster added a commit that referenced this issue Oct 3, 2019
…into develop

* 'develop' of https://github.com/gep13/chocolatey-vscode: (181 commits)
  Bump @types/node-fetch from 2.3.0 to 2.3.4
  Bump @types/node from 11.12.0 to 12.0.2
  Bump expect from 24.7.1 to 24.8.0
  Bump typescript from 3.3.4000 to 3.4.5
  Bump mocha from 6.0.2 to 6.1.4
  Bump vscode from 1.1.30 to 1.1.34
  Bump tslint from 5.14.0 to 5.16.0
  Bump @types/xml2js from 0.4.3 to 0.4.4
  Bump expect from 24.5.0 to 24.7.1
  Bump @types/node-fetch from 2.1.7 to 2.3.0
  Bump @types/node from 11.11.6 to 11.12.0
  Bump @types/node from 11.11.5 to 11.11.6
  Bump @types/node from 11.11.4 to 11.11.5
  Bump @types/node-fetch from 2.1.6 to 2.1.7
  Bump @types/node from 11.11.3 to 11.11.4
  Bump typescript from 3.3.3333 to 3.3.4000
  (GH-70) Validates that the author does not match the maintainer
  Bump @types/node from 11.11.1 to 11.11.3
  Bump tslint from 5.13.1 to 5.14.0
  (doc) Added priority to new docs
  ...
gep13 added a commit that referenced this issue Sep 6, 2023
Simply put, this isn't ready for usage, and lots of decisions need to be
made about how it will be used going forward.  Rather than prevent other
releases of this extension while we are waiting on the Language Server
support, let's move the current code into a branch and continue over
there.
gep13 added a commit that referenced this issue Sep 6, 2023
This code has been taken from the develop branch, so that we can
continue the development of the language server portion of the extension
without preventing other ongoing work from going out the door.

We will get to this at some point, but for now, this should be regarded
as a nice have.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants