From 762c2d70bd968969f8ba2f19756b4a4057050598 Mon Sep 17 00:00:00 2001 From: Skylot Date: Sun, 24 Sep 2023 17:05:40 +0100 Subject: [PATCH] chore: fix typos --- .typos.toml | 20 +++++++++++++++++++ .../main/java/jadx/cli/SingleClassMode.java | 2 +- .../typeinference/TypeInferenceVisitor.java | 6 +++--- .../jadx/core/xmlgen/ParserConstants.java | 2 +- .../gui/device/debugger/SmaliDebugger.java | 2 +- .../jadx/gui/ui/codearea/SmaliTokenMaker.java | 4 ++-- .../jadx/gui/utils/layout/WrapLayout.java | 4 ++-- 7 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 .typos.toml diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 000000000..f199888a0 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,20 @@ +# Config for 'typos' spellchecker (https://github.com/crate-ci/typos) + +[default.extend-words] +IPUT = "IPUT" +Laf = "Laf" +Darcula="Darcula" + +[default] +extend-ignore-identifiers-re = [ + "finaly", # intentional package name +] + +[files] +extend-exclude = [ + "config/", + "jadx-core/src/main/resources/", + "jadx-core/src/test/", + "jadx-gui/src/main/resources/i18n/", + "!jadx-gui/src/main/resources/i18n/Messages_en_US.properties", +] \ No newline at end of file diff --git a/jadx-cli/src/main/java/jadx/cli/SingleClassMode.java b/jadx-cli/src/main/java/jadx/cli/SingleClassMode.java index 97e529da8..f0078a3bb 100644 --- a/jadx-cli/src/main/java/jadx/cli/SingleClassMode.java +++ b/jadx-cli/src/main/java/jadx/cli/SingleClassMode.java @@ -36,7 +36,7 @@ public class SingleClassMode { throw new JadxRuntimeException("Input class not found: " + singleClass); } if (clsForProcess.contains(AFlag.DONT_GENERATE)) { - throw new JadxRuntimeException("Input class can't be saved by currect jadx settings (marked as DONT_GENERATE)"); + throw new JadxRuntimeException("Input class can't be saved by current jadx settings (marked as DONT_GENERATE)"); } if (clsForProcess.isInner()) { clsForProcess = clsForProcess.getTopParentClass(); diff --git a/jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/TypeInferenceVisitor.java b/jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/TypeInferenceVisitor.java index 970bc5ae7..065d400e7 100644 --- a/jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/TypeInferenceVisitor.java +++ b/jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/TypeInferenceVisitor.java @@ -675,13 +675,13 @@ public final class TypeInferenceVisitor extends AbstractVisitor { } private boolean trySplitConstInsns(MethodNode mth) { - boolean constSplitted = false; + boolean constSplit = false; for (SSAVar var : new ArrayList<>(mth.getSVars())) { if (checkAndSplitConstInsn(mth, var)) { - constSplitted = true; + constSplit = true; } } - if (!constSplitted) { + if (!constSplit) { return false; } InitCodeVariables.rerun(mth); diff --git a/jadx-core/src/main/java/jadx/core/xmlgen/ParserConstants.java b/jadx-core/src/main/java/jadx/core/xmlgen/ParserConstants.java index 64802084b..239b832e1 100644 --- a/jadx-core/src/main/java/jadx/core/xmlgen/ParserConstants.java +++ b/jadx-core/src/main/java/jadx/core/xmlgen/ParserConstants.java @@ -155,7 +155,7 @@ public class ParserConstants { protected static final int FLAG_COMPLEX = 0x0001; // If set, this resource has been declared public, so libraries are allowed to reference it. protected static final int FLAG_PUBLIC = 0x0002; - // If set, this is a weak resource and may be overriden by strong resources of the same name/type. + // If set, this is a weak resource and may be overridden by strong resources of the same name/type. // This is only useful during linking with other resource tables. protected static final int FLAG_WEAK = 0x0004; diff --git a/jadx-gui/src/main/java/jadx/gui/device/debugger/SmaliDebugger.java b/jadx-gui/src/main/java/jadx/gui/device/debugger/SmaliDebugger.java index f49f0b517..ab10e794e 100644 --- a/jadx-gui/src/main/java/jadx/gui/device/debugger/SmaliDebugger.java +++ b/jadx-gui/src/main/java/jadx/gui/device/debugger/SmaliDebugger.java @@ -392,7 +392,7 @@ public class SmaliDebugger { public interface MethodEntryListener { /** - * return ture to remove + * return true to remove */ boolean entry(String mthSig); } diff --git a/jadx-gui/src/main/java/jadx/gui/ui/codearea/SmaliTokenMaker.java b/jadx-gui/src/main/java/jadx/gui/ui/codearea/SmaliTokenMaker.java index b52ac88c9..a082039a4 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/codearea/SmaliTokenMaker.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/codearea/SmaliTokenMaker.java @@ -1055,7 +1055,7 @@ public class SmaliTokenMaker extends AbstractJFlexCTokenMaker { /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", + "Unknown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; @@ -1393,7 +1393,7 @@ public class SmaliTokenMaker extends AbstractJFlexCTokenMaker { } /** - * Reports an error that occured while scanning. + * Reports an error that occurred while scanning. * * In a wellformed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method diff --git a/jadx-gui/src/main/java/jadx/gui/utils/layout/WrapLayout.java b/jadx-gui/src/main/java/jadx/gui/utils/layout/WrapLayout.java index 2a399e352..f97752ff4 100644 --- a/jadx-gui/src/main/java/jadx/gui/utils/layout/WrapLayout.java +++ b/jadx-gui/src/main/java/jadx/gui/utils/layout/WrapLayout.java @@ -92,7 +92,7 @@ public class WrapLayout extends FlowLayout { */ private Dimension layoutSize(Container target, boolean preferred) { synchronized (target.getTreeLock()) { - // Each row must fit with the width allocated to the containter. + // Each row must fit with the width allocated to the container. // When the container width = 0, the preferred width of the container // has not yet been calculated so lets ask for the maximum. @@ -155,7 +155,7 @@ public class WrapLayout extends FlowLayout { // When using a scroll pane or the DecoratedLookAndFeel we need to // make sure the preferred size is less than the size of the - // target containter so shrinking the container size works + // target container so shrinking the container size works // correctly. Removing the horizontal gap is an easy way to do this. Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target);