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

License filename matching: check for word boundaries around the word 'license' or 'licence' #130

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jayaddison
Copy link

Resolves #126.

(reopens #127, but from a repository within the openculinary organization on GitHub, since this fixup is intended for use there)

… looking for potential license files in project directories
…ce' when looking for potential license files in project directories"

This reverts commit b673731.
… looking for potential license files in project directories

This is an alternative implementation of commit b673731.
…ry-check

Interleaves implementation approaches from commit b673731 and commit 1ea317b.
@jayaddison
Copy link
Author

Gentle ping @xz64

@@ -85,8 +85,10 @@ class LicenseTextReader {
): string | null {
for (const path of paths) {
const filePath = this.fileSystem.join(modulePath, path);
if (/^licen[cs]e/i.test(path) && !this.fileSystem.isDirectory(filePath)) {
return path;
if (/^licen[cs]e/i.test(path) || /\blicen[cs]e\b/i.test(path)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a useful addition to the code. What to you think about including the 'Unlicense' while you're at it?
The topic came up here #131.

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

Successfully merging this pull request may close these issues.

Suggestion: adjustment for license filename match
2 participants