Skip to content

Commit 108d0a8

Browse files
committed
chore(doc):SP-4117 add missing Javadoc documentation
1 parent 2e80756 commit 108d0a8

23 files changed

Lines changed: 204 additions & 14 deletions

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Added `file_snippet` scan configuration support in `scanoss.json` for engine tuning parameters (`min_snippet_hits`, `min_snippet_lines`, `honour_file_exts`, `ranking_enabled`, `ranking_threshold`, `skip_headers`, `skip_headers_limit`)
1313
- Added CLI scan configuration options with resolution priority (file_snippet > CLI)
1414
- Added `FileSnippet` class for scan configuration management and resolution
15+
- Scan configuration parameters are now sent as base64-encoded JSON in the `scanoss-settings` HTTP header
16+
### Fixed
17+
- Fixed Javadoc warnings across the codebase
1518

1619
## [0.12.1] - 2026-01-08
1720
### Changed

config/checkstyle.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
5+
6+
<module name="Checker">
7+
<property name="severity" value="warning"/>
8+
<property name="fileExtensions" value="java"/>
9+
10+
<module name="LineLength">
11+
<property name="fileExtensions" value="java"/>
12+
<property name="max" value="150"/>
13+
</module>
14+
15+
<module name="TreeWalker">
16+
<module name="AvoidStarImport"/>
17+
<module name="UnusedImports">
18+
<property name="processJavadoc" value="false"/>
19+
</module>
20+
</module>
21+
</module>

src/main/java/com/scanoss/ScanossConstants.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
*/
3434
@SuppressWarnings("SpellCheckingInspection")
3535
public class ScanossConstants {
36+
37+
/** Private constructor to prevent instantiation. */
38+
private ScanossConstants() {
39+
}
40+
3641
/**
3742
* Default timeout for HTTP communication
3843
*/
@@ -52,7 +57,7 @@ public class ScanossConstants {
5257
static final int MIN_FILE_SIZE = 256; // Minimum size for a file to be considered for snippet generation
5358
static final int MAX_LONG_LINE_CHARS = 1000; // Maximum length of a single source line to be considered source code
5459

55-
// File extensions to ignore snippets for
60+
/** File extensions to ignore snippets for. */
5661
public static final List<String> SKIP_SNIPPET_EXT = Arrays.asList(
5762
".exe", ".zip", ".tar", ".tgz", ".gz", ".7z", ".rar", ".jar", ".war", ".ear", ".class", ".pyc",
5863
".o", ".a", ".so", ".obj", ".dll", ".lib", ".out", ".app", ".bin",
@@ -61,17 +66,17 @@ public class ScanossConstants {
6166
".pdf", ".min.js", ".mf", ".sum", ".woff", ".woff2", ".xsd", ".pom", ".whl"
6267
);
6368

64-
// Folders to skip
69+
/** Folders to skip during scanning. */
6570
public static final List<String> FILTERED_DIRS = Arrays.asList(
6671
"nbproject", "nbbuild", "nbdist", "__pycache__", "venv", "_yardoc", "eggs", "wheels", "htmlcov",
6772
"__pypackages__", "target"
6873
);
6974

70-
// Folder endings to skip
75+
/** Folder suffixes to skip during scanning. */
7176
public static final List<String> FILTERED_DIR_EXT = List.of(".egg-info");
7277

7378

74-
// File extensions to skip
79+
/** File extensions to skip during scanning. */
7580
public static final List<String> FILTERED_EXTENSIONS = Arrays.asList(
7681
".1", ".2", ".3", ".4", ".5", ".6", ".7", ".8", ".9", ".ac", ".adoc", ".am",
7782
".asciidoc", ".bmp", ".build", ".cfg", ".chm", ".class", ".cmake", ".cnf",
@@ -94,7 +99,7 @@ public class ScanossConstants {
9499
"readme", "swiftdoc", "texidoc", "todo", "version", "ignore", "manifest", "sqlite", "sqlite3"
95100
);
96101

97-
// Files to skip
102+
/** Files to skip during scanning. */
98103
public static final List<String> FILTERED_FILES = Arrays.asList(
99104
"gradlew", "gradlew.bat", "mvnw", "mvnw.cmd", "gradle-wrapper.jar", "maven-wrapper.jar",
100105
"thumbs.db", "babel.config.js", "license.txt", "license.md", "copying.lib", "makefile"

src/main/java/com/scanoss/filters/BaseFilter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@
3232
*/
3333
@Slf4j
3434
public abstract class BaseFilter {
35+
/** The filter configuration. */
3536
protected final FilterConfig config;
37+
/** The Git ignore pattern filter. */
3638
protected final GitIgnoreFilter gitIgnoreFilter;
39+
/** The Ant pattern filter. */
3740
protected final AntFilter antFilter;
41+
/** The combined base skip filter predicate. */
3842
protected final Predicate<Path> baseSkipFilter;
3943

4044
/**

src/main/java/com/scanoss/filters/FileFilter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public class FileFilter extends BaseFilter {
3939
@Builder.Default // Tells Lombok this field has a default initialization
4040
private final FilterConfig filterConfig = FilterConfig.builder().build();
4141

42-
// Use @Builder constructor annotation to tell Lombok to use this constructor
42+
/**
43+
* Constructs a FileFilter with the specified configuration.
44+
*
45+
* @param filterConfig the filter configuration
46+
*/
4347
protected FileFilter(FilterConfig filterConfig) {
4448
super(filterConfig);
4549
this.filterConfig = filterConfig;

src/main/java/com/scanoss/filters/FolderFilter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
*/
3737
public class FolderFilter extends BaseFilter {
3838

39+
/**
40+
* Constructs a FolderFilter with the specified configuration.
41+
*
42+
* @param filterConfig the filter configuration
43+
*/
3944
public FolderFilter(FilterConfig filterConfig) {
4045
super(filterConfig);
4146
}

src/main/java/com/scanoss/filters/GitIgnoreFilter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public class GitIgnoreFilter {
4444
@Setter(AccessLevel.PRIVATE)
4545
private List<FastIgnoreRule> rules;
4646

47+
/**
48+
* Constructs a GitIgnoreFilter with the specified patterns.
49+
*
50+
* @param patterns the list of Git ignore patterns
51+
*/
4752
@Builder
4853
public GitIgnoreFilter(@NonNull List<String> patterns) {
4954
this.rules = new ArrayList<>();

src/main/java/com/scanoss/filters/factories/FileFilterFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
A factory class that provides a static method for creating file filtering predicates.
3232
*/
3333
public class FileFilterFactory {
34+
/** Private constructor to prevent instantiation. */
35+
private FileFilterFactory() {
36+
}
3437
/**
3538
* Creates a file filtering predicate based on the provided configuration.
3639
*

src/main/java/com/scanoss/filters/factories/FolderFilterFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
A factory class that provides a static method for creating folder filtering predicates.
3232
*/
3333
public class FolderFilterFactory {
34+
/** Private constructor to prevent instantiation. */
35+
private FolderFilterFactory() {
36+
}
3437
/**
3538
* Creates a folder filtering predicate based on the provided configuration.
3639
*

src/main/java/com/scanoss/settings/Bom.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,18 @@
3636
@Data
3737
@Builder
3838
@AllArgsConstructor
39-
@NoArgsConstructor
4039
public class Bom {
4140

41+
/** Default constructor. */
42+
public Bom() {
43+
this.include = new ArrayList<>();
44+
this.ignore = new ArrayList<>();
45+
this.remove = new ArrayList<>();
46+
this.replace = new ArrayList<>();
47+
this.sortedReplace = new ArrayList<>();
48+
}
49+
50+
4251
/**
4352
* List of include rules for adding context when scanning.
4453
* These rules are sent to the SCANOSS API and have a higher chance of being

0 commit comments

Comments
 (0)