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

improve vhf/free-programming-books-lint #5031

Closed
borgified opened this issue Nov 1, 2020 · 7 comments
Closed

improve vhf/free-programming-books-lint #5031

borgified opened this issue Nov 1, 2020 · 7 comments
Labels
help wanted Needs help solving a blocked / stucked item

Comments

@borgified
Copy link
Contributor

https://github.com/vhf/free-programming-books-lint/blob/master/dist/lint.js#L10

it appears the linter only considers these "languages". we want to expand the list to include other languages/files as well. eg. Vietnamese, C, Java, SQL lists.

looks like https://github.com/vhf/free-programming-books-lint/blob/master/dist/lint.js#L12 determines what language a particular file is, ie. just based on a part of its filename. maybe its possible to expand that list to include vietnamese since that’s not in the first array of langs. (expecting vn)

in our case, free-courses-vi.md maybe it should be vn instead to conform to ISO 3166

@kadhirash kadhirash added the help wanted Needs help solving a blocked / stucked item label Nov 2, 2020
@contributor13
Copy link
Contributor

I would like to fix this issue. Can anyone please suggest what should I do exactly.

@eshellman
Copy link
Collaborator

@borgified 'vi' is the correct language code (ISO 639-1); ISO 3166 are country codes.
@contributor13 take a look at https://github.com/vhf/free-programming-books-lint/blob/master/dist/lint.js#L12 and figure out what needs fixing.

This was referenced Nov 10, 2020
@kadhirash
Copy link
Member

kadhirash commented Nov 14, 2020

What I came to notice and my understanding is that from the linter code, it excludes the following files: 'README.md', 'CONTRIBUTING.md', 'CODE_OF_CONDUCT.md', 'SUMMARY.md'

That's why the alphabetization isn't enforced for the above files, but it is for "CODE_OF_CONDUCT-es.md" as seen in #5117.

The langstoAlphabetize var doesn't include 'th' so the Thai resources won't be checked for alphabetization as seen in #3287.

The other languages added to the repository but not updated to the langsToAlphabetize var won't be alphabetized, such as Thai(th), Farsi(fa_IR), Tamil(ta), etc.

A temporary solution could be to just keep adding the ISO 639-1 codes for languages whenever a certain language file is added to the langsToAlphabetize var.

@eshellman
Copy link
Collaborator

@computamike has contributed a nice fix for pipes to https://github.com/vhf/free-programming-books-lint/ I've created 3 issues there to address the problems noted in this issue. Folks with Node experience should find these issues pretty easy to fix.

@eshellman
Copy link
Collaborator

The most recent PR #5207 seems to have missed an alphabetization error - have we messed up the linter by moving the lists into directories?

@eshellman
Copy link
Collaborator

Thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Needs help solving a blocked / stucked item
Projects
None yet
Development

No branches or pull requests

5 participants