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

Automate file headers #5207

Merged
merged 51 commits into from
Mar 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
43812f1
Configure spotless plugin for license headers
niloc132 Oct 24, 2023
722c16d
Generated headers need an obvious signature
niloc132 Oct 24, 2023
a83308a
Avoid license headers in generated grpc/pb files
niloc132 Oct 24, 2023
481b5d8
Avoid license headers in grpc py files
niloc132 Oct 24, 2023
1f33a7e
Exclude config files
niloc132 Oct 24, 2023
7fdac65
Avoid overwriting replicted headers
niloc132 Oct 24, 2023
7805708
Handle replication for shorter headers
niloc132 Oct 24, 2023
8e0156e
safe replication updates
niloc132 Oct 24, 2023
da8292e
wip
niloc132 Oct 25, 2023
69889b9
Don't replace apache headers in grpc-java
niloc132 Oct 25, 2023
a18bdf9
License header attempt
niloc132 Feb 27, 2024
d4e661c
Attempt to update code generators to match
niloc132 Feb 27, 2024
232a3a2
Add marker for generated headers
niloc132 Feb 27, 2024
d3f0415
Update replication tasks to use the new format
niloc132 Feb 27, 2024
3008408
Allow more files to be spotless'd
niloc132 Feb 27, 2024
18af78e
Update replication to write gradle task to run it
niloc132 Feb 27, 2024
2f517b7
Revert header changes before we review
niloc132 Feb 27, 2024
f7d695b
Temporarily disable spotless headers
niloc132 Feb 27, 2024
702b9e5
Spotless on codegen classes
niloc132 Feb 27, 2024
976fe3d
Spotless on non-generated StateManager types
niloc132 Feb 27, 2024
373a421
Disable formatting on javapoet-generated types
niloc132 Feb 27, 2024
6448485
Adjust comment-consuming code
niloc132 Feb 28, 2024
43354aa
Disable formatting on template files
niloc132 Feb 28, 2024
3b2120f
fix repl primitives
niloc132 Feb 28, 2024
4add80c
disable more formatting
niloc132 Feb 28, 2024
82197ea
Extra newline after generated header
niloc132 Feb 28, 2024
776d564
Python files need some content after license header
niloc132 Feb 29, 2024
a5dc237
Update copyright year
niloc132 Feb 29, 2024
8924a2b
Restore copyright header change, disable all exclusions
niloc132 Feb 29, 2024
d3019c4
Disable formatter for other generated classes
niloc132 Feb 29, 2024
7a78ee9
engine-table primitive codegen
niloc132 Feb 29, 2024
2b2fdaa
Don't re-enable formatting, it will affect replicated types
niloc132 Feb 29, 2024
f81ecb8
Avoid formatting downstream chunk hashers
niloc132 Feb 29, 2024
d1e5595
No need to dedup headers any more
niloc132 Feb 29, 2024
55eb1e5
Share header in 3 places
niloc132 Feb 29, 2024
d029de4
Add headers in more generated files
niloc132 Feb 29, 2024
f4f13da
Disable formatting on generated files
niloc132 Feb 29, 2024
9a2dc5e
No need to suppress here
niloc132 Feb 29, 2024
b279fe5
Always remove, re-apply headers
niloc132 Feb 29, 2024
c96bb3c
Allow header line to disable spotless
niloc132 Feb 29, 2024
39ba0b2
ReplicateHashTable should emit a header
niloc132 Feb 29, 2024
f98eaef
Don't format this file
niloc132 Feb 29, 2024
805fd56
Mark generated segments as not formatted
niloc132 Mar 1, 2024
ae42946
Roll back unnecessary formatting
niloc132 Mar 1, 2024
3bae47c
Always generate code before formatting/checking
niloc132 Mar 1, 2024
d5ee50b
Reinstate spotless excludes for generated proto output
niloc132 Mar 1, 2024
25609dc
Reinstate spotless excludes for generated proto output
niloc132 Mar 1, 2024
b4bd974
Leave generated test reference impl out of spotless
niloc132 Mar 1, 2024
f32b507
Additional excludes
niloc132 Mar 5, 2024
bbca76b
Review feedback from Ryan pt1: remove extra formatter tags, fix task …
niloc132 Mar 6, 2024
13233e6
Restore copyright headers to ftl using correct syntax
niloc132 Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Spotless on codegen classes
niloc132 committed Feb 27, 2024
commit 702b9e5b6f1aa603f853a5e168f195a79a1bcf9a
6 changes: 3 additions & 3 deletions Generators/src/main/java/io/deephaven/gen/GenUtils.java
Original file line number Diff line number Diff line change
@@ -43,9 +43,9 @@ public static String javaHeader(final Class<?> generatorClass, final String grad
"// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending",
"//",
"// ****** AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY",
"// ****** Run " + generatorClass.getSimpleName() + " or \"./gradlew " + gradleTask + "\" to regenerate",
"//"
);
"// ****** Run " + generatorClass.getSimpleName() + " or \"./gradlew " + gradleTask
+ "\" to regenerate",
"//");
}

/**
Original file line number Diff line number Diff line change
@@ -315,8 +315,7 @@ public static void main(String args[]) {
"// ****** AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY",
"// ****** Run " + QueryLanguageFunctionGenerator.class.getSimpleName() + " to regenerate",
"//",
""
));
""));

buf.append("package io.deephaven.engine.table.impl.lang;\n\n");

@@ -359,14 +358,13 @@ public static void main(String args[]) {
/* Now start the test class: */

testBuf.append(String.join("\n",
"//",
"// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending",
"//",
"// ****** AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY",
"// ****** Run " + QueryLanguageFunctionGenerator.class.getSimpleName() + " to regenerate",
"//",
""
));
"//",
"// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending",
"//",
"// ****** AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY",
"// ****** Run " + QueryLanguageFunctionGenerator.class.getSimpleName() + " to regenerate",
"//",
""));

testBuf.append("package io.deephaven.engine.table.impl.lang;\n\n");