-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlombok.config
More file actions
55 lines (49 loc) · 2.75 KB
/
Copy pathlombok.config
File metadata and controls
55 lines (49 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# SPDX-FileCopyrightText: 2026 Bernard Ladenthin <bernard.ladenthin@gmail.com>
#
# SPDX-License-Identifier: Apache-2.0
# Stop the config-resolution from bubbling up into parent directories.
config.stopBubbling = true
# Emit @lombok.Generated on every generated member. SpotBugs / JaCoCo /
# SonarQube special-case this annotation and skip the synthetic methods
# from coverage requirements and bug detectors. Without this, SpotBugs at
# effort=Max + threshold=Low surfaces dozens of synthetic-bytecode findings
# (USBR_UNNECESSARY_STORE_BEFORE_RETURN, IMC_IMMATURE_CLASS_NO_TOSTRING,
# NM_FIELD_NAMING_CONVENTION, ...) on every Lombok-generated method.
lombok.addLombokGeneratedAnnotation = true
# Default to "skip" on @EqualsAndHashCode / @ToString: we inherit from
# Object in almost all cases; "skip" is the right default for
# Object-extending classes. Classes that extend a non-Object base override
# per-annotation with @EqualsAndHashCode(callSuper = true) /
# @ToString(callSuper = true). Without this, Lombok emits a WARNING on
# every @EqualsAndHashCode without explicit callSuper, which -Werror
# promotes to a build break.
lombok.equalsAndHashCode.callSuper = skip
lombok.toString.callSuper = skip
# Force Lombok's @EqualsAndHashCode / @ToString to read FIELDS directly
# instead of routing through `this.getX()` (the default). Rationale:
#
# Some classes expose value-add getters that wrap their @Nullable field in
# Optional<T> or wrap a list field in Collections.unmodifiableList + Optional.
# Those wrappers are the public-API contract, not the equality contract:
#
# 1. fb-contrib's OI_OPTIONAL_ISSUES_CHECKING_REFERENCE fires on every
# Lombok-generated `this$x == null` branch when `x` is an Optional —
# Optional is the standard "never null" type, so the null branch is
# dead code.
# 2. unmodifiableList + Optional wrapper getters allocate fresh wrappers
# on every equals call. Field access avoids the allocations.
# 3. The two forms are semantically equivalent: Optional.equals and
# Collections.unmodifiableList(x).equals(...) both delegate to value-
# based comparison of the underlying state.
#
# All value classes in these repos are `final`, so subclass-override of a
# getter cannot change equality. callSuper=true chains are unaffected —
# `super.equals()` is still a method call, and the parent class's own
# field handling is governed by the same setting.
lombok.equalsAndHashCode.doNotUseGetters = true
lombok.toString.doNotUseGetters = true
# Do NOT generate Spring-style @ConstructorProperties; java.beans is not
# needed by this codebase and pulls in the desktop module on some JDKs.
lombok.anyConstructor.addConstructorProperties = false
# Allow Lombok-style accessor patterns without warnings.
lombok.accessors.flagUsage = ALLOW