-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
New common check: Helper functions should be private #207
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
479cb4e
Implement check
jiegillet d37101c
Add Source to read and hold exemploid files
jiegillet 03e2c8a
Add tests for missing/corrupted example files
jiegillet 4bb879a
Send proper file name to compiler warnings
jiegillet 0d8d91a
Read practice exercice example files in test cases
jiegillet 3c253f1
Add tests, fix old tests with public helpers
jiegillet d71693f
update submodule
jiegillet 598e783
mix format and mix credo
jiegillet 2b562d4
Typos and formatting
jiegillet 62255c8
Refactor, remove undocumented :file and :module parameters
jiegillet 6c54a27
Add tests for private helpers
jiegillet eadbd8b
Merge branch 'main' into jie-private-helpers
angelikatyborska cb3af04
Change check to consider arity
jiegillet c53427d
Rework check test to show comment details
jiegillet bec9589
Update externel test CI and submodule
jiegillet 6ad53bd
typo
jiegillet 7de9006
Update submodule with cleaned up exemploids
jiegillet 4667a77
Arguments to _, show first failure
jiegillet 6e5c3a7
Hide functions after @doc false or @impl true
jiegillet 6584333
Revert "Hide functions after @doc false or @impl true"
jiegillet d6d9397
Annotate AST to keep track of modules
jiegillet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule elixir
updated
92 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder about these:
After a quick check, it looks like all solution/example/exemplar values in all config.json only have one file in there. But that doesn't mean that we are capturing the full code. There are some exercises with the
editor
field, and students that submit solutions via the CLI may add more files.I'll open an issue after this PR gets merged so we can form a plan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neenjaw do I remember correctly that your initial assumption was to just ignore multi file submissions? I think that was totally reasonable as they are very rare. It would be cool to at least get the basic common checks working for multi file solutions (e.g. proper name casing, indentation) but I wouldn't spend too much effort on making it perfect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I wrote that line of code, example files were only a single file. If that's not the case anymore, then makes sense to change strategy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example files are still a single file, but the checks only look at the file mentioned in
meta_config["files"]["solution"]
. In case students submit several files, they are not looked at. And might actually get a compiler error as an analyzer comment, now that I think about it. Could you re-submit one of your multiple file solutions and check?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiled elixir is still dynamically linked at run time so it just needs to be legal syntax, not runnable code, for code to compile successfully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true enough, although not foolproof.