Skip to content

Conversation

kchenery
Copy link

@kchenery kchenery commented Aug 18, 2025

As the title says, I've stumbled onto some common URLs and whilst I can add these to a list of allowed licenses to pass into the tool I think others probably benefit from these.

Im not sure how you'd like to "fix" the tests for these URLs. They're not direct links to txt files and so the comparison for received v verified will be a challenge.

I could add logic to "skip" the opensource.org url if thats acceptable?

@sensslen
Copy link
Owner

Hi @kchenery , thank you for your contribution. It is welcome. The tests don't need direct text files as peers. They use selenium to extract the text from the url and then verify that the text found in the corresponding text file is present. I will accept such pull requests if they reliably pass these tests, as they will verify that the license with this url is still available and sound...

@kchenery
Copy link
Author

Thats somewhat the problem I was getting at. I think most of the time you're expecting the URL to be a text file with the raw license text. However; with opensource.org this isnt the case as its got website components in it. And whilst its the raw text the test checks for thats likely to change. I could add the corresponding check file but I'm worried the website will change too rapidly and tests in the future will fail which will become frustrating for many.

I'm not sure what a good path forward here is even though I think recognising the opensource.org urls is beneficial.

@sensslen
Copy link
Owner

The test is already setup to check whether the provided text is a part of the website text. So you basically make sure that the license text is contained within the url's content. The other parts of the website is ignored. If the license text does not occur when checking the site, it's a worrying error. I was running into similar problems with other license url's and that's the way I resloved those issues....

@kchenery
Copy link
Author

@sensslen I've added the license text files now. Tests do pass locally now too.

I also added a rule for Sonar to ignore the hard coded Urls in this class. Hope you're ok with that.

@sensslen
Copy link
Owner

@sensslen I've added the license text files now. Tests do pass locally now too.

I also added a rule for Sonar to ignore the hard coded Urls in this class. Hope you're ok with that.

Looks good now - thanks for adding the sonarcloud rule - I use sonarcloud for suggestions - not everything they report makes sense...

There are formatting issues still. You can just run dotnet format on the solution...

Copy link

@kchenery
Copy link
Author

@sensslen I have run dotnet format now. Do you want things rebased first? There's no conflcts.

@sensslen sensslen merged commit f5445c0 into sensslen:main Aug 21, 2025
23 checks passed
@sensslen
Copy link
Owner

@kchenery thank you very much for your contribution

Whatch out for a new release containing these updates

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.

2 participants