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

no config #110

Merged
merged 9 commits into from
Jan 15, 2024
Merged

no config #110

merged 9 commits into from
Jan 15, 2024

Conversation

stoeffel
Copy link
Owner

@stoeffel stoeffel commented Jan 11, 2024

closes #109

What changes?

  • makes elm-verify-examples.json optional
  • adds new option in config for running it on all files
  • removes root
  • respects source-directories.

@stoeffel stoeffel changed the title Glob no config Jan 11, 2024
@gampleman
Copy link
Collaborator

This is awesome!

What do you think about making all default for applications and exposed-modules, README.md for packages? Slightly more annoying to explain in the readme, but it's probably the simplest way to use the tool?

@stoeffel
Copy link
Owner Author

What do you think about making all default for applications and exposed-modules, README.md for packages? Slightly more annoying to explain in the readme, but it's probably the simplest way to use the tool?

I actually wonder about just removing exposed-modules. Packages usually don't have that many modules and running all instead of just exposed isn't an overhead. What do you think? @gampleman

@gampleman
Copy link
Collaborator

🤷 I kind of like 'exposed-modules', but I also like simplicity... and chances are it's not going to be that big of a difference in the vast majority of cases.

@stoeffel
Copy link
Owner Author

@knuton any feedback before I merge and release?

Copy link
Collaborator

@knuton knuton left a comment

Choose a reason for hiding this comment

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

Nice!

Noticed two details in skimming the changeset.

Readme.md Outdated Show resolved Hide resolved

try {
verifyExamples = require(configPath);
if (verifyExamples["root"] !== undefined) {
throw new Error(
"elm-verify-examples.json: 'root' is no longer a valid key. It defaults to point one directory up from `/tests`."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe I misunderstand, but I think this error will just be swallowed by the catch block?

Copy link
Owner Author

Choose a reason for hiding this comment

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

you are totally correct.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm not sure if we should even keep this. It's a major bump and mentioned in the CHANGELOG. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be OK to skip it. Migration is easy enough.

Otherwise, just inform of superfluous config via console.warn? The tool is most likely going to work if a root is given, but it's a nice courtesy to inform that the config is (1) being ignored, (2) no longer needed.

stoeffel and others added 2 commits January 15, 2024 12:03
Co-authored-by: Johannes Emerich <johannes@emerich.de>
@stoeffel
Copy link
Owner Author

closes #67

@stoeffel stoeffel merged commit 78b71b8 into master Jan 15, 2024
1 check passed
@stoeffel stoeffel deleted the glob branch January 15, 2024 13:47
This was referenced Jan 15, 2024
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.

3 participants