1
- package com . iwillfailyou ;
1
+ package dev . youshallnotpass ;
2
2
3
- import com .iwillfailyou .inspections .AllfinalExtension ;
4
- import com .iwillfailyou .inspections .AllpublicExtension ;
5
- import com .iwillfailyou .inspections .InheritancefreeExtension ;
6
- import com .iwillfailyou .inspections .InspectionExtension ;
7
- import com .iwillfailyou .inspections .NoMultipleReturnExtension ;
8
- import com .iwillfailyou .inspections .NullfreeExtension ;
9
- import com .iwillfailyou .inspections .SetterFreeExtension ;
10
- import com .iwillfailyou .inspections .StaticfreeExtension ;
11
- import com .iwillfailyou .plugin .Inspection ;
12
- import com .iwillfailyou .plugin .IwfyException ;
13
- import com .iwillfailyou .plugin .IwfyPlugin ;
14
- import com .iwillfailyou .plugin .IwfyUrls ;
15
- import com .iwillfailyou .plugin .PublicInspection ;
3
+ import dev .youshallnotpass .inspections .AllfinalExtension ;
4
+ import dev .youshallnotpass .inspections .AllpublicExtension ;
5
+ import dev .youshallnotpass .inspections .InheritancefreeExtension ;
6
+ import dev .youshallnotpass .inspections .InspectionExtension ;
7
+ import dev .youshallnotpass .inspections .NoMultipleReturnExtension ;
8
+ import dev .youshallnotpass .inspections .NullfreeExtension ;
9
+ import dev .youshallnotpass .inspections .SetterFreeExtension ;
10
+ import dev .youshallnotpass .inspections .StaticfreeExtension ;
16
11
import com .nikialeksey .goo .Goo ;
17
12
import com .nikialeksey .goo .GooException ;
18
13
import com .nikialeksey .goo .Origin ;
14
+ import dev .youshallnotpass .plugin .Inspection ;
15
+ import dev .youshallnotpass .plugin .PublicInspection ;
16
+ import dev .youshallnotpass .plugin .YsnpException ;
17
+ import dev .youshallnotpass .plugin .YsnpPlugin ;
18
+ import dev .youshallnotpass .plugin .YsnpUrls ;
19
19
import org .cactoos .func .SolidFunc ;
20
+ import org .cactoos .iterable .Mapped ;
20
21
import org .cactoos .list .ListOf ;
21
- import org .cactoos .list .Mapped ;
22
22
import org .gradle .api .GradleScriptException ;
23
23
import org .gradle .api .Plugin ;
24
24
import org .gradle .api .Project ;
30
30
import java .util .ArrayList ;
31
31
import java .util .List ;
32
32
33
- public final class IwillfailyouPlugin implements Plugin <Project > {
33
+ public final class YoushallnotpassPlugin implements Plugin <Project > {
34
34
@ Override
35
35
public void apply (final Project target ) {
36
36
final ExtensionContainer targetExtensions = target .getExtensions ();
37
- final IwillfailyouExtension settings = targetExtensions .create (
38
- "iwillfailyou " ,
39
- IwillfailyouExtension .class
37
+ final YoushallnotpassExtension settings = targetExtensions .create (
38
+ "youshallnotpass " ,
39
+ YoushallnotpassExtension .class
40
40
);
41
41
final ExtensionAware settingsExtension = (ExtensionAware ) settings ;
42
42
final ExtensionContainer settingsExtensions = settingsExtension .getExtensions ();
@@ -72,13 +72,15 @@ public void apply(final Project target) {
72
72
)
73
73
);
74
74
75
- target .task ("iwillfailyou " ).doLast ((final Task task ) -> {
75
+ target .task ("youshallnotpass " ).doLast ((final Task task ) -> {
76
76
for (final InspectionExtension inspectionExtension : inspectionExtensions ) {
77
77
inspectionExtension .inheritExclude (settings .getExclude ());
78
78
}
79
- final List <Inspection > inspections = new Mapped <>(
80
- new SolidFunc <>(InspectionExtension ::inspection ),
81
- inspectionExtensions
79
+ final List <Inspection > inspections = new ListOf <>(
80
+ new Mapped <>(
81
+ new SolidFunc <>(InspectionExtension ::inspection ),
82
+ inspectionExtensions
83
+ )
82
84
);
83
85
try {
84
86
final List <Inspection > wrapped ;
@@ -93,32 +95,32 @@ public void apply(final Project target) {
93
95
for (final Inspection inspection : inspections ) {
94
96
wrapped .add (
95
97
new PublicInspection (
96
- new IwfyUrls (
98
+ new YsnpUrls (
97
99
origin ,
98
- "https://www.iwillfailyou.com "
100
+ "https://www.youshallnotpass.dev "
99
101
),
100
102
inspection
101
103
)
102
104
);
103
105
}
104
106
} catch (final GooException e ) {
105
- throw new IwfyException (
107
+ throw new YsnpException (
106
108
"Could not get the origin for git repo. You can " +
107
109
"use offline version, if you have not git " +
108
- "repo yet, just set the iwillfailyou { " +
110
+ "repo yet, just set the youshallnotpass { " +
109
111
"offline = true }" ,
110
112
e
111
113
);
112
114
}
113
115
}
114
- new IwfyPlugin (
116
+ new YsnpPlugin (
115
117
new GradleUi (target .getLogger ()),
116
118
target .getRootDir (),
117
119
wrapped
118
120
).run ();
119
- } catch (final IwfyException e ) {
121
+ } catch (final YsnpException e ) {
120
122
throw new GradleScriptException (
121
- "Can not make the iwillfailyou analysis." ,
123
+ "Can not make the youshallnotpass analysis." ,
122
124
e
123
125
);
124
126
}
0 commit comments