Skip to content

Commit de27ab9

Browse files
Per NordlöwPer Nordlöw
authored andcommitted
Use @safe: at the beginning
1 parent 30290bc commit de27ab9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+139
-14
lines changed

src/dscanner/analysis/alias_syntax_check.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import dparse.ast;
99
import dparse.lexer;
1010
import dscanner.analysis.base;
1111

12+
@safe:
13+
1214
/**
1315
* Checks for uses of the old alias syntax.
1416
*/

src/dscanner/analysis/allman.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import dsymbol.scope_ : Scope;
1212
import std.algorithm;
1313
import std.range;
1414

15+
@safe:
16+
1517
/**
1618
Checks for the allman style (braces should be on their own line)
1719
------------

src/dscanner/analysis/asm_style.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import dscanner.analysis.base;
1212
import dscanner.analysis.helpers;
1313
import dsymbol.scope_ : Scope;
1414

15+
@safe:
16+
1517
/**
1618
* Checks for confusing asm expressions.
1719
* See_also: $(LINK https://issues.dlang.org/show_bug.cgi?id=9738)

src/dscanner/analysis/assert_without_msg.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import dparse.ast;
1313
import std.stdio;
1414
import std.algorithm;
1515

16+
@safe:
17+
1618
/**
1719
* Check that all asserts have an explanatory message.
1820
*/

src/dscanner/analysis/auto_function.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import dparse.lexer;
1313
import std.stdio;
1414
import std.algorithm.searching : any;
1515

16+
@safe:
17+
1618
/**
1719
* Checks for auto functions without return statement.
1820
*

src/dscanner/analysis/auto_ref_assignment.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import dparse.lexer;
99
import dparse.ast;
1010
import dscanner.analysis.base;
1111

12+
@safe:
13+
1214
/**
1315
* Checks for assignment to auto-ref function parameters.
1416
*/

src/dscanner/analysis/base.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import dparse.ast;
66
import std.array;
77
import dsymbol.scope_ : Scope;
88

9+
@safe:
10+
911
struct Message
1012
{
1113
/// Name of the file where the warning was triggered

src/dscanner/analysis/builtin_property_names.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import dscanner.analysis.helpers;
1414
import dsymbol.scope_;
1515
import std.algorithm : map;
1616

17+
@safe:
18+
1719
/**
1820
* The following code should be killed with fire:
1921
* ---

src/dscanner/analysis/comma_expression.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import dparse.lexer;
1010
import dscanner.analysis.base;
1111
import dsymbol.scope_;
1212

13+
@safe:
14+
1315
/**
1416
* Check for uses of the comma expression.
1517
*/

src/dscanner/analysis/config.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module dscanner.analysis.config;
77

88
import inifiled;
99

10+
@safe:
11+
1012
/// Returns: A default configuration.
1113
StaticAnalysisConfig defaultStaticAnalysisConfig()
1214
{

0 commit comments

Comments
 (0)