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

Documentation, add simple scalar scalar SEXPs, weak warnings, cleanup #7

Merged
merged 7 commits into from
Feb 12, 2024

Conversation

Jakobeha
Copy link
Contributor

@Jakobeha Jakobeha commented Feb 8, 2024

The main change is that I documented every public method, except where unreasonable (e.g. obvious cases), in which case I suppressed the documentation warning.

Also created specific classes for simple-scalar SEXPs, since they are AST nodes I suspect we'll sometime want to pattern-match on them directly (but if not, I just exposed the package-private class).

Added weak warnings for missing Javadoc on public declarations, and a couple other things that IntelliJ reports but doesn't warn for some reason: redundant local variable types (String foo = "bar") and unnecessary qualifiers (this.foo instead of foo). These should be automatically available to anyone using IntelliJ, but if not, they are the "project default" inspections. We may want to discuss and change other inspections, IntelliJ has a lot of them, although I think it's best to for the most part stick with the defaults (a lot of the disabled ones are really pedantic and maybe add a lot of IDE overhead).

Lastly, various bugfixes and cleanup.

…/resources`

Move snapshots into `src/test` so they're closer to the resources they get generated from and are easier to find.

Combine `src/test/R` and `src/test/resources` because the distinction is confusing and adds extra complexity we don't really need.

Also add a few comments to clarify how the resources and snapshots are used.
…e place

we can just pattern match in the one place if we ever use it (I believe it's `set_tag` or something in the interpreter)
I revealed these SEXPs and not the other variants because these are literals we may see compiled. The other variants would probably never be used. Also I think (hope because SEXPs are ugly) we'll use regular objects instead of SEXPs as much as possible, especially when generating native code. But I can see cases where we need to statically type the simple scalar SEXPs.
And where it isn't reasonable (e.g. too obvious or a GNU-R named thing), suppress the documentation warning.

Also does various code cleanup discovered while documenting (e.g. exceptions thrown by specific operations should have package-private constructors).
… that IntelliJ default doesn't.

These may be further discussed and changed, but it makes sense for everyone to have the same inspections:

- Weak warning for missing Javadoc on public declarations
- Weak warning for redundant local variable types (`String foo = "bar"`)
- Weak warnings for unnecessary qualifiers (e.g. `this.foo` instead of `foo`)
@Jakobeha Jakobeha merged commit 02134ba into main Feb 12, 2024
2 checks passed
@Jakobeha Jakobeha deleted the documentation branch February 12, 2024 21:14
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.

1 participant