Skip to content

Commit

Permalink
chore: nowarp.github.ionowarp.io
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv committed Sep 12, 2024
1 parent bd8bb5c commit 1421a2c
Show file tree
Hide file tree
Showing 37 changed files with 62 additions and 63 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See: https://nowarp.github.io/tools/misti/docs/hacking/contributing
See: https://nowarp.io/tools/misti/docs/hacking/contributing
2 changes: 1 addition & 1 deletion src/createDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function createDetector(nameOrPath: string): Promise<boolean> {
[
`Created ${filepath}\n`,
"Now you can add your detector to the configuration file and execute it. ",
"See: https://nowarp.github.io/tools/misti/docs/hacking/custom-detector.",
"See: https://nowarp.io/tools/misti/docs/hacking/custom-detector.",
].join(""),
);
return true;
Expand Down
3 changes: 1 addition & 2 deletions src/internals/warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export enum Severity {
/**
* Base URL to detectors documentation.
*/
export const BASE_DOC_URL =
"https://nowarp.github.io/tools/misti/docs/detectors";
export const BASE_DOC_URL = "https://nowarp.io/tools/misti/docs/detectors";

/**
* Misti warning that highlights a specific place in a Tact contract.
Expand Down
2 changes: 1 addition & 1 deletion test/good/branch-duplicate-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/branch-duplicate-1.tact:3:5:
4 | a = 43; // bad
Duplicated code in conditional branches detected
Help: Identical code in both branches detected. Refactor to eliminate redundancy.
See: https://nowarp.github.io/tools/misti/docs/detectors/BranchDuplicate
See: https://nowarp.io/tools/misti/docs/detectors/BranchDuplicate
2 changes: 1 addition & 1 deletion test/good/branch-duplicate-2.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/branch-duplicate-2.tact:3:12:
4 | }
Duplicated code in conditional branches detected
Help: Identical code in both branches detected. Refactor to eliminate redundancy.
See: https://nowarp.github.io/tools/misti/docs/detectors/BranchDuplicate
See: https://nowarp.io/tools/misti/docs/detectors/BranchDuplicate
2 changes: 1 addition & 1 deletion test/good/constant-address-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/constant-address-1.tact:5:18:
6 | }
Found Constant Address
Help: Using hardcoded addresses can sometimes indicate poor contract design
See: https://nowarp.github.io/tools/misti/docs/detectors/ConstantAddress
See: https://nowarp.io/tools/misti/docs/detectors/ConstantAddress
2 changes: 1 addition & 1 deletion test/good/div-before-mul-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/div-before-mul-1.tact:5:21:
6 | return result;
Divide Before Multiply
Help: Consider rearranging the operations: division should follow multiplication
See: https://nowarp.github.io/tools/misti/docs/detectors/DivideBeforeMultiply
See: https://nowarp.io/tools/misti/docs/detectors/DivideBeforeMultiply
2 changes: 1 addition & 1 deletion test/good/div-before-mul-3.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/div-before-mul-3.tact:2:16:
3 | let c: Int = 2;
Divide Before Multiply
Help: Consider rearranging the operations: division should follow multiplication
See: https://nowarp.github.io/tools/misti/docs/detectors/DivideBeforeMultiply
See: https://nowarp.io/tools/misti/docs/detectors/DivideBeforeMultiply
2 changes: 1 addition & 1 deletion test/good/dump-is-used-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/dump-is-used-1.tact:2:5:
3 | }
Found Dump Usage
Help: Using `dump` in production code can sometimes indicate complex code that requires additional review
See: https://nowarp.github.io/tools/misti/docs/detectors/DumpIsUsed
See: https://nowarp.io/tools/misti/docs/detectors/DumpIsUsed
2 changes: 1 addition & 1 deletion test/good/field-double-init-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/field-double-init-1.tact:4:9:
5 | }
Field Initialized Twice
Help: Consider initializing the field only in its declaration or in the `init` function
See: https://nowarp.github.io/tools/misti/docs/detectors/FieldDoubleInit
See: https://nowarp.io/tools/misti/docs/detectors/FieldDoubleInit
2 changes: 1 addition & 1 deletion test/good/imports-1/imports-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/imports-1/constants.tact:2:1:
3 |
Constant is never used
Help: Consider removing the constant
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables
2 changes: 1 addition & 1 deletion test/good/imports-2/imports-2.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/imports-2/constants.tact:3:1:
4 |
Constant is never used
Help: Consider removing the constant
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables
2 changes: 1 addition & 1 deletion test/good/imports-3/imports-3.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/imports-3/constants.tact:2:1:
3 |
Constant is never used
Help: Consider removing the constant
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables
4 changes: 2 additions & 2 deletions test/good/loops-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test/good/loops-1.tact:5:5:
6 | sum = sum + i;
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: i += 1
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/loops-1.tact:6:5:
5 | i = i + 1;
Expand All @@ -14,4 +14,4 @@ test/good/loops-1.tact:6:5:
7 | }
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: sum += i
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign
4 changes: 2 additions & 2 deletions test/good/loops-2.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test/good/loops-2.tact:5:5:
6 | sum = sum + i;
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: i += 1
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/loops-2.tact:6:5:
5 | i = i + 1;
Expand All @@ -14,4 +14,4 @@ test/good/loops-2.tact:6:5:
7 | } until (i < 10);
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: sum += i
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign
4 changes: 2 additions & 2 deletions test/good/loops-3.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test/good/loops-3.tact:5:5:
6 | sum = sum + i;
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: i += 1
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/loops-3.tact:6:5:
5 | i = i + 1;
Expand All @@ -14,4 +14,4 @@ test/good/loops-3.tact:6:5:
7 | }
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: sum += i
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign
2 changes: 1 addition & 1 deletion test/good/messages-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/messages-1.tact:8:9:
9 | self.reply(M{value: self.val}.toCell());
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.val += 1
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign
2 changes: 1 addition & 1 deletion test/good/never-accessed-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/never-accessed-1.tact:2:5:
3 | if (true) { // Bad: write-only variable
Write-only variable
Help: The variable value should be accessed
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables
2 changes: 1 addition & 1 deletion test/good/never-accessed-2.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/never-accessed-2.tact:3:5:
4 |
Field is never used
Help: Consider creating a constant instead of field
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables
2 changes: 1 addition & 1 deletion test/good/never-accessed-7.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/never-accessed-7.tact:2:5:
3 | let b: Int = 22; // read-only variable
Variable is never accessed
Help: Consider removing the variable
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables
2 changes: 1 addition & 1 deletion test/good/never-accessed-8.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/never-accessed-8.tact:3:9:
4 | }
Variable is never accessed
Help: Consider removing the variable
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables
8 changes: 4 additions & 4 deletions test/good/prefer-augmented-assign-1.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test/good/prefer-augmented-assign-1.tact:7:9:
8 | a = 1 + a;
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: a += 1
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/prefer-augmented-assign-1.tact:8:9:
7 | a = a + 1;
Expand All @@ -14,7 +14,7 @@ test/good/prefer-augmented-assign-1.tact:8:9:
9 | self.field = 1 + self.field;
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: a += 1
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/prefer-augmented-assign-1.tact:9:9:
8 | a = 1 + a;
Expand All @@ -23,7 +23,7 @@ test/good/prefer-augmented-assign-1.tact:9:9:
10 | self.field = self.field + a;
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.field += 1
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/prefer-augmented-assign-1.tact:10:9:
9 | self.field = 1 + self.field;
Expand All @@ -32,4 +32,4 @@ test/good/prefer-augmented-assign-1.tact:10:9:
11 |
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.field += a
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign
2 changes: 1 addition & 1 deletion test/good/readonly-2.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/readonly-2.tact:2:9:
3 | repeat (a) { /* do nothing */ }
Read-only variable
Help: Consider creating a constant instead
See: https://nowarp.github.io/tools/misti/docs/detectors/ReadOnlyVariables
See: https://nowarp.io/tools/misti/docs/detectors/ReadOnlyVariables
2 changes: 1 addition & 1 deletion test/good/readonly-3.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/readonly-3.tact:2:9:
3 | if (a == 42) {}
Read-only variable
Help: Consider creating a constant instead
See: https://nowarp.github.io/tools/misti/docs/detectors/ReadOnlyVariables
See: https://nowarp.io/tools/misti/docs/detectors/ReadOnlyVariables
2 changes: 1 addition & 1 deletion test/good/readonly-4.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ test/good/readonly-4.tact:2:9:
3 | if (a == 42) { /* do nothing */ }
Read-only variable
Help: Consider creating a constant instead
See: https://nowarp.github.io/tools/misti/docs/detectors/ReadOnlyVariables
See: https://nowarp.io/tools/misti/docs/detectors/ReadOnlyVariables
14 changes: 7 additions & 7 deletions test/good/sample-jetton.expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test/good/sample-jetton.tact:312:9:
313 | let jettonAmount: Int = msg.loadCoins();
Variable is never accessed
Help: Consider removing the variable
See: https://nowarp.github.io/tools/misti/docs/detectors/NeverAccessedVariables
See: https://nowarp.io/tools/misti/docs/detectors/NeverAccessedVariables

test/good/sample-jetton.tact:67:9:
66 | self.requireWallet(msg.owner); // Check wallet
Expand All @@ -14,7 +14,7 @@ test/good/sample-jetton.tact:67:9:
68 |
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.totalSupply -= msg.amount
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/sample-jetton.tact:89:9:
88 | require(self.totalSupply + amount <= self.max_supply, "The total supply will be overlapping.");
Expand All @@ -23,7 +23,7 @@ test/good/sample-jetton.tact:89:9:
90 |
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.totalSupply += amount
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/sample-jetton.tact:213:9:
212 |
Expand All @@ -32,7 +32,7 @@ test/good/sample-jetton.tact:213:9:
214 | require(self.balance >= 0, "Invalid balance");
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.balance -= msg.amount
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/sample-jetton.tact:244:9:
243 |
Expand All @@ -41,7 +41,7 @@ test/good/sample-jetton.tact:244:9:
245 | require(self.balance >= 0, "Invalid balance"); // Update balance
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.balance += msg.amount
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/sample-jetton.tact:290:9:
289 |
Expand All @@ -50,7 +50,7 @@ test/good/sample-jetton.tact:290:9:
291 | require(self.balance >= 0, "Invalid balance");
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.balance -= msg.amount
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign

test/good/sample-jetton.tact:316:9:
315 |
Expand All @@ -59,4 +59,4 @@ test/good/sample-jetton.tact:316:9:
317 | }
Prefer Augmented Assignment
Help: Consider using augmented assignment instead: self.balance += jettonAmount
See: https://nowarp.github.io/tools/misti/docs/detectors/PreferAugmentedAssign
See: https://nowarp.io/tools/misti/docs/detectors/PreferAugmentedAssign
Loading

0 comments on commit 1421a2c

Please sign in to comment.