Skip to content

Commit f82fb66

Browse files
algonellError Prone Team
authored andcommitted
Fix typos
Fix typos in documentation, comments, etc. Fixes #4568 COPYBARA_INTEGRATE_REVIEW=#4568 from algonell:master 086e9a6 PiperOrigin-RevId: 678249177
1 parent fb1a05b commit f82fb66

File tree

17 files changed

+24
-24
lines changed

17 files changed

+24
-24
lines changed

check_api/src/main/java/com/google/errorprone/bugpatterns/BugChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private boolean isSuppressed(SuppressWarnings suppression) {
285285
public boolean isSuppressed(Tree tree, VisitorState state) {
286286
Symbol sym = getDeclaredSymbol(tree);
287287
/*
288-
* TOOD(cpovirk): At least for @SuppressWarnings, should our suppression checks look for
288+
* TODO(cpovirk): At least for @SuppressWarnings, should our suppression checks look for
289289
* annotations only on the kinds of trees that are covered by SuppressibleTreePathScanner? Or,
290290
* now that @SuppressWarnings has been changed to be applicable to all declaration locations,
291291
* should we generalize SuppressibleTreePathScanner to look on all those locations?

check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessAnnotations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public static Optional<Nullness> fromAnnotationsOn(@Nullable TypeMirror type) {
156156
// Note this may be a good candidate for caching
157157
public static Optional<Nullness> fromDefaultAnnotations(@Nullable Element sym) {
158158
while (sym != null) {
159-
// Just look through declaration annotations here for simplicitly; default annotations aren't
159+
// Just look through declaration annotations here for simplicity; default annotations aren't
160160
// type annotations. For now we're just using a hard-coded simple name.
161161
// TODO(b/121272440): Look for existing default annotations
162162
if (sym.getAnnotationMirrors().stream()

check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTransfer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,14 +1170,14 @@ public boolean hasNonNullConstantValue() {
11701170
.build();
11711171

11721172
/**
1173-
* Maps from non-null test methods to indices of arguments that are comapred against null. These
1173+
* Maps from non-null test methods to indices of arguments that are compared against null. These
11741174
* methods must guarantee non-nullness if {@code true} <b>and nullness if {@code false}</b>.
11751175
*/
11761176
private static final ImmutableSetMultimap<MemberName, Integer> NONNULL_IFF_TRUE_PARAMETERS =
11771177
ImmutableSetMultimap.of(member(Objects.class, "nonNull"), 0);
11781178

11791179
/**
1180-
* Maps from null test methods to indices of arguments that are comapred against null. These
1180+
* Maps from null test methods to indices of arguments that are compared against null. These
11811181
* methods must guarantee nullness if {@code true} <b>and non-nullness if {@code false}</b>.
11821182
*/
11831183
private static final ImmutableSetMultimap<MemberName, Integer> NULL_IFF_TRUE_PARAMETERS =

core/src/main/java/com/google/errorprone/bugpatterns/DoNotCallSuggester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public Description matchMethod(MethodTree tree, VisitorState state) {
138138
}
139139
}
140140

141-
// if a method name contais a banned substring, exit
141+
// if a method name contains a banned substring, exit
142142
for (String methodSubstring : METHOD_SUBSTRINGS_TO_IGNORE) {
143143
if (methodName.contains(methodSubstring)) {
144144
return NO_MATCH;

core/src/main/java/com/google/errorprone/bugpatterns/argumentselectiondefects/Costs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Costs {
3535
/** Formal parameters for the method being called. */
3636
private final ImmutableList<Parameter> formals;
3737

38-
/** Actual parameters (argments) for the method call. */
38+
/** Actual parameters (arguments) for the method call. */
3939
private final ImmutableList<Parameter> actuals;
4040

4141
/**

core/src/main/java/com/google/errorprone/bugpatterns/formatstring/FormatStringValidation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ protected Void defaultAction(Tree tree, Void unused) {
145145

146146
/**
147147
* Return an instance of the given type if it receives special handling by {@code String.format}.
148-
* For example, an intance of {@link Integer} will be returned for an input of type {@code int} or
149-
* {@link Integer}.
148+
* For example, an instance of {@link Integer} will be returned for an input of type {@code int}
149+
* or {@link Integer}.
150150
*/
151151
private static @Nullable Object getInstance(Tree tree, VisitorState state) {
152152
Object value = ASTHelpers.constValue(tree);

core/src/main/java/com/google/errorprone/bugpatterns/time/DateChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import java.util.List;
4242

4343
/**
44-
* Warns against suspect looking calls to {@link java.util.Date} APIs. Noteably, {@code Date} uses:
44+
* Warns against suspect looking calls to {@link java.util.Date} APIs. Notably, {@code Date} uses:
4545
*
4646
* <ul>
4747
* <li>1900-based years (negative values permitted)

core/src/main/java/com/google/errorprone/bugpatterns/time/JavaLocalDateTimeGetNano.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
@BugPattern(
4040
summary =
41-
"localDateTime.getNano() only accesss the nanos-of-second field."
41+
"localDateTime.getNano() only access the nanos-of-second field."
4242
+ " It's rare to only use getNano() without a nearby getSecond() call.",
4343
severity = WARNING)
4444
public final class JavaLocalDateTimeGetNano extends BugChecker

core/src/test/java/com/google/errorprone/bugpatterns/inject/guice/testdata/OverridesGuiceInjectableMethodNegativeCases.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void foo() {}
4444

4545
/**
4646
* Class with a method foo() annotated with @com.google.inject.Inject that overrides a method
47-
* annoted with @javax.inject.Inject.
47+
* annotated with @javax.inject.Inject.
4848
*/
4949
public class TestClass4 extends TestClass2 {
5050
@com.google.inject.Inject

core/src/test/java/com/google/errorprone/bugpatterns/inject/testdata/MissingRuntimeRetentionNegativeCases.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ public class MissingRuntimeRetentionNegativeCases {
4444
@Retention(RUNTIME)
4545
public @interface TestAnnotation2 {}
4646

47-
/** A qualifer(@Qualifier) annotation with runtime retention. */
47+
/** A qualifier (@Qualifier) annotation with runtime retention. */
4848
@Qualifier
4949
@Target({TYPE, METHOD})
5050
@Retention(RUNTIME)
5151
public @interface TestAnnotation3 {}
5252

53-
/** A qualifer(@BindingAnnotation) annotation with runtime retention. */
53+
/** A qualifier (@BindingAnnotation) annotation with runtime retention. */
5454
@BindingAnnotation
5555
@Target({TYPE, METHOD})
5656
@Retention(RUNTIME)
5757
public @interface TestAnnotation4 {}
5858

59-
/** A non-qualifer, non-scoping annotation without runtime retention. */
59+
/** A non-qualifier, non-scoping annotation without runtime retention. */
6060
@Retention(SOURCE)
6161
public @interface TestAnnotation5 {}
6262

0 commit comments

Comments
 (0)