Skip to content

Commit f601ea2

Browse files
author
Steve Winton
authored
Merge pull request #3 from swinton/use-local-eslint-formatter
Use local eslint formatter
2 parents 2f9afad + 5d32053 commit f601ea2

File tree

2,608 files changed

+2518532
-2
lines changed

Some content is hidden

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

2,608 files changed

+2518532
-2
lines changed

.github/workflows/upload-sarif.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Runs the ESlint code analysis
1818
- name: Run ESLint
1919
# eslint exits 1 if it finds anything to report
20-
run: node_modules/.bin/eslint index.js -f node_modules/@microsoft/eslint-formatter-sarif/sarif.js -o results.sarif.json || true
20+
run: npm run lint || true
2121
- name: Expose report
2222
uses: actions/upload-artifact@v2
2323
with:

eslint-formatter/.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name : Validation rule request
3+
about : A detailed specification for a new SARIF validation rule to add to the Sarif.Multitool validate command.
4+
title : "[RULE REQUEST] Concise description of new analysis"
5+
labels : validation-rule-request
6+
assignees : ''
7+
8+
---
9+
10+
---
11+
12+
# Rule Proposal: [Friendly Rule Name]
13+
- *Synopsis* : [Brief summary of the rule, include code snippets if possible.]
14+
15+
- *[Violation Example]* : [Optional, Include code snippet which should trigger the violation.]
16+
17+
- *[No Violation Example]* : [Optional, Include code snippet which demostrates ideal condition (no violation).]
18+
19+
---
20+
21+
### Rule metadata
22+
- [*Id*] : [Should be formatted as `SARIF1nnn`, leave blank if unsure]
23+
- *Name* : [Provide a friendly symbolic name for the rule in PascalCase.]
24+
- *Level* : [Possible values are: `error`, `warning`, or `note`.]
25+
- *Full description* : [Provide atleast two sentences. The first sentence should be a short description of the rule.
26+
This will appear as `Short Description` in rules metadata. The other sentence(s) should
27+
describe usage of the rule and any other relevant information.]
28+
29+
- User-facing strings:
30+
[Each rule has one or more result message strings, each with symbolic name in PascalCase.]
31+
32+
- *FirstMessage* : [Default user facing string.]
33+
- *[SecondMessage]* : [Optional, Any conditional user facing string(s).]
34+
- *[ThirdMessage]* : [Optional, Any conditional user facing string(s).]
35+
36+
---
37+
38+
### Links/Additional Information
39+
*[Optional, any Links/Additional Information.]*
40+
41+
### Implementation Notes
42+
*[Optional, any suggestions regarding implementation.]*
43+
44+
### How to resolve
45+
*[Optional, any tips on how to resolve the violation.]*
46+
47+
---

eslint-formatter/.gitignore

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# Dev machine files
5+
appsettings.local.json
6+
7+
# User-specific files
8+
*.suo
9+
*.user
10+
*.userosscache
11+
*.sln.docstates
12+
*.opendb
13+
*.db
14+
15+
# User-specific files (MonoDevelop/Xamarin Studio)
16+
*.userprefs
17+
18+
# Build results
19+
[Dd]ebug/
20+
[Dd]ebugPublic/
21+
[Rr]elease/
22+
[Rr]eleases/
23+
x64/
24+
x86/
25+
bld/
26+
[Bb]in/
27+
[Oo]bj/
28+
29+
# Visual Studio 2015 cache/options directory
30+
.vs/
31+
32+
# Visual Studio 2017 browsing database files
33+
.BROWSE.VC.DB*
34+
35+
# Visual Studio 2017 Application/Debug properties
36+
launchSettings.json
37+
38+
# VS Code configuration
39+
.vscode/
40+
41+
# MSTest test Results
42+
[Tt]est[Rr]esult*/
43+
[Bb]uild[Ll]og.*
44+
45+
# NUNIT
46+
*.VisualState.xml
47+
TestResult.xml
48+
49+
# Build Results of an ATL Project
50+
[Dd]ebugPS/
51+
[Rr]eleasePS/
52+
dlldata.c
53+
54+
# DNX
55+
project.lock.json
56+
artifacts/
57+
58+
*_i.c
59+
*_p.c
60+
*_i.h
61+
*.ilk
62+
*.meta
63+
*.obj
64+
*.pch
65+
*.pdb
66+
*.pgc
67+
*.pgd
68+
*.rsp
69+
*.sbr
70+
*.tlb
71+
*.tli
72+
*.tlh
73+
*.tmp
74+
*.tmp_proj
75+
*.log
76+
*.vspscc
77+
*.vssscc
78+
.builds
79+
*.pidb
80+
*.svclog
81+
*.scc
82+
83+
# Chutzpah Test files
84+
_Chutzpah*
85+
86+
# Visual C++ cache files
87+
ipch/
88+
*.aps
89+
*.ncb
90+
*.opensdf
91+
*.sdf
92+
*.cachefile
93+
94+
# Visual Studio profiler
95+
*.psess
96+
*.vsp
97+
*.vspx
98+
99+
# TFS 2012 Local Workspace
100+
$tf/
101+
102+
# Guidance Automation Toolkit
103+
*.gpState
104+
105+
# ReSharper is a .NET coding add-in
106+
_ReSharper*/
107+
*.[Rr]e[Ss]harper
108+
*.DotSettings.user
109+
110+
# JustCode is a .NET coding add-in
111+
.JustCode
112+
113+
# TeamCity is a build add-in
114+
_TeamCity*
115+
116+
# DotCover is a Code Coverage Tool
117+
*.dotCover
118+
119+
# NCrunch
120+
_NCrunch_*
121+
.*crunch*.local.xml
122+
123+
# MightyMoose
124+
*.mm.*
125+
AutoTest.Net/
126+
127+
# Web workbench (sass)
128+
.sass-cache/
129+
130+
# Installshield output folder
131+
[Ee]xpress/
132+
133+
# DocProject is a documentation generator add-in
134+
DocProject/buildhelp/
135+
DocProject/Help/*.HxT
136+
DocProject/Help/*.HxC
137+
DocProject/Help/*.hhc
138+
DocProject/Help/*.hhk
139+
DocProject/Help/*.hhp
140+
DocProject/Help/Html2
141+
DocProject/Help/html
142+
143+
# Click-Once directory
144+
publish/
145+
146+
# Publish Web Output
147+
*.[Pp]ublish.xml
148+
*.azurePubxml
149+
## TODO: Comment the next line if you want to checkin your
150+
## web deploy settings but do note that will include unencrypted
151+
## passwords
152+
#*.pubxml
153+
154+
*.publishproj
155+
156+
# NuGet Packages
157+
*.nupkg
158+
# The packages folder can be ignored because of Package Restore
159+
**/packages/*
160+
# except build/, which is used as an MSBuild target.
161+
!**/packages/build/
162+
# Uncomment if necessary however generally it will be regenerated when needed
163+
#!**/packages/repositories.config
164+
165+
# Windows Azure Build Output
166+
csx/
167+
*.build.csdef
168+
169+
# Windows Store app package directory
170+
AppPackages/
171+
172+
# Visual Studio cache files
173+
# files ending in .cache can be ignored
174+
*.[Cc]ache
175+
# but keep track of directories ending in .cache
176+
!*.[Cc]ache/
177+
178+
# Others
179+
ClientBin/
180+
[Ss]tyle[Cc]op.*
181+
~$*
182+
*~
183+
*.dbmdl
184+
*.dbproj.schemaview
185+
*.pfx
186+
*.publishsettings
187+
node_modules/
188+
orleans.codegen.cs
189+
190+
# RIA/Silverlight projects
191+
Generated_Code/
192+
193+
# Backup & report files from converting an old project file
194+
# to a newer Visual Studio version. Backup files are not needed,
195+
# because we have git ;-)
196+
_UpgradeReport_Files/
197+
Backup*/
198+
UpgradeLog*.XML
199+
UpgradeLog*.htm
200+
201+
# SQL Server files
202+
*.mdf
203+
*.ldf
204+
205+
# Business Intelligence projects
206+
*.rdl.data
207+
*.bim.layout
208+
*.bim_*.settings
209+
210+
# Microsoft Fakes
211+
FakesAssemblies/
212+
213+
# Node.js Tools for Visual Studio
214+
.ntvs_analysis.dat
215+
216+
# Visual Studio 6 build log
217+
*.plg
218+
219+
# Visual Studio 6 workspace options file
220+
*.opt
221+
222+
# LightSwitch generated files
223+
GeneratedArtifacts/
224+
_Pvt_Extensions/
225+
ModelManifest.xml

eslint-formatter/.nuget/NuGet.exe

5.42 MB
Binary file not shown.

eslint-formatter/BeforeBuild.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
#@ECHO off
3+
#SETLOCAL
4+
5+
Exit()
6+
{
7+
echo
8+
echo script %~n0 failed
9+
return 1
10+
}
11+
12+
dotnet restore src/Sarif.Sdk.sln
13+
14+
if [ $? != 0 ]
15+
then
16+
echo nuget restore failed.
17+
Exit
18+
return $?
19+
fi
20+
21+
# Once JSchema has been ported to .NET Core, uncomment these lines:
22+
#
23+
#dotnet msbuild /verbosity:minimal /target:BuildAndInjectObjectModel src/Sarif/Sarif.csproj /fileloggerparameters:Verbosity=detailed
24+
#
25+
#if [ $? != 0 ]
26+
#then
27+
# echo SARIF object model generation failed.
28+
# Exit
29+
# return $?
30+
#fi

eslint-formatter/BuildAndTest.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
powershell -ExecutionPolicy RemoteSigned -File %~dp0\scripts\BuildAndTest.ps1 %*

0 commit comments

Comments
 (0)