Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit967c6a0

Browse files
committed
Add New WebApp for testing globs
* Update to .NET 5.0* Fix issue with parser getting stuck
1 parentf11a6eb commit967c6a0

37 files changed

+1442
-47
lines changed

‎.github/workflows/web-app.yaml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name:Deploy to GitHub Pages
2+
3+
# Run workflow on every push to the master branch
4+
# taken from https://swimburger.net/blog/dotnet/fix-blazor-webassembly-pwa-integrity-checks
5+
on:
6+
push:
7+
branches:[ develop ]
8+
9+
defaults:
10+
run:
11+
working-directory:src/GlobApp
12+
jobs:
13+
deploy-to-github-pages:
14+
# use ubuntu-latest image to run steps on
15+
runs-on:ubuntu-latest
16+
steps:
17+
# uses GitHub's checkout action to checkout code form the master branch
18+
-uses:actions/checkout@v2
19+
20+
# sets up .NET Core SDK 5.0.302
21+
-name:Setup .NET Core SDK
22+
uses:actions/setup-dotnet@v1
23+
with:
24+
dotnet-version:5.0.302
25+
26+
# publishes Blazor project to the release-folder
27+
-name:Publish .NET Core Project
28+
run:dotnet publish GlobApp.csproj -c Release -o release --nologo
29+
30+
# add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project. (Allow files and folders starting with an underscore)
31+
-name:Add .nojekyll file
32+
run:touch release/wwwroot/.nojekyll
33+
34+
-name:Commit wwwroot to GitHub Pages
35+
uses:JamesIves/github-pages-deploy-action@4.1.4
36+
with:
37+
branch:gh-pages
38+
folder:src/GlobApp/release/wwwroot

‎ChangeLog.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
##[Unreleased]
9+
###Added
10+
- New Glob testing app using Blazor
11+
12+
###Fixed
13+
- Fixed issue where invalid patterns can cause the parser to get stuck
14+
915
###Updated
1016
- Improved performance from parser internals rework
17+
- Updated to .NET 5.0
1118

1219
###Changed
1320
- Matching full path is now the default for Glob expressions, GlobOptions.MatchFilenameOnly

‎Glob.sln‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 15
3-
VisualStudioVersion =15.0.27130.2010
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion =16.0.29519.87
45
MinimumVisualStudioVersion =10.0.40219.1
56
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") ="Solution Items","Solution Items","{F967A574-936D-4CCE-B01F-E21F972F7E77}"
67
ProjectSection(SolutionItems) =preProject
@@ -20,14 +21,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Glob.Benchmarks", "test\Glo
2021
EndProject
2122
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="_build","build\_build.csproj","{EAC1C60C-5215-408A-B50C-D1680749B1B4}"
2223
EndProject
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="GlobApp","src\GlobApp\GlobApp.csproj","{78F86BDC-3ABA-46E9-AAA2-13295FCF8277}"
25+
EndProject
2326
Global
2427
GlobalSection(SolutionConfigurationPlatforms) =preSolution
2528
Debug|Any CPU=Debug|Any CPU
2629
Release|Any CPU=Release|Any CPU
2730
EndGlobalSection
2831
GlobalSection(ProjectConfigurationPlatforms) =postSolution
29-
{EAC1C60C-5215-408A-B50C-D1680749B1B4}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
30-
{EAC1C60C-5215-408A-B50C-D1680749B1B4}.Release|Any CPU.ActiveCfg=Release|Any CPU
3132
{5A5A5C43-BE46-4FE3-817F-C851E56913A2}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
3233
{5A5A5C43-BE46-4FE3-817F-C851E56913A2}.Debug|Any CPU.Build.0=Debug|Any CPU
3334
{5A5A5C43-BE46-4FE3-817F-C851E56913A2}.Release|Any CPU.ActiveCfg=Release|Any CPU
@@ -40,11 +41,19 @@ Global
4041
{E96F09D7-1EC3-4985-908B-64C137DCCDF7}.Debug|Any CPU.Build.0=Debug|Any CPU
4142
{E96F09D7-1EC3-4985-908B-64C137DCCDF7}.Release|Any CPU.ActiveCfg=Release|Any CPU
4243
{E96F09D7-1EC3-4985-908B-64C137DCCDF7}.Release|Any CPU.Build.0=Release|Any CPU
44+
{EAC1C60C-5215-408A-B50C-D1680749B1B4}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
45+
{EAC1C60C-5215-408A-B50C-D1680749B1B4}.Release|Any CPU.ActiveCfg=Release|Any CPU
46+
{78F86BDC-3ABA-46E9-AAA2-13295FCF8277}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
47+
{78F86BDC-3ABA-46E9-AAA2-13295FCF8277}.Debug|Any CPU.Build.0=Debug|Any CPU
48+
{78F86BDC-3ABA-46E9-AAA2-13295FCF8277}.Release|Any CPU.ActiveCfg=Release|Any CPU
49+
{78F86BDC-3ABA-46E9-AAA2-13295FCF8277}.Release|Any CPU.Build.0=Release|Any CPU
4350
EndGlobalSection
4451
GlobalSection(SolutionProperties) =preSolution
4552
HideSolutionNode =FALSE
4653
EndGlobalSection
4754
GlobalSection(ExtensibilityGlobals) =postSolution
4855
SolutionGuid ={A29FBFB8-B98C-4EDA-8C3D-DFFC9D5CBE18}
4956
EndGlobalSection
57+
GlobalSection(NestedProjects) =preSolution
58+
EndGlobalSection
5059
EndGlobal

‎LICENSE‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013-2020 Kevin Thompson
3+
Copyright (c) 2013-2021 Kevin Thompson and Glob contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

‎build/Build.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Build : NukeBuild
6464
AbsolutePathCoverageReportDirectory=>ArtifactsDirectory/"coverage-report";
6565
AbsolutePathCoverageReportArchive=>ArtifactsDirectory/"coverage-report.zip";
6666

67-
conststringMasterBranch="master";
67+
conststringMainBranch="main";
6868
conststringDevelopBranch="develop";
6969
conststringReleaseBranchPrefix="release";
7070
conststringHotfixBranchPrefix="hotfix";
@@ -183,7 +183,7 @@ class Build : NukeBuild
183183
.Requires(()=>ApiKey)
184184
.Requires(()=>GitHasCleanWorkingCopy())
185185
.Requires(()=>Configuration.Equals(Configuration.Release))
186-
.Requires(()=>GitRepository.Branch.EqualsOrdinalIgnoreCase(MasterBranch)||
186+
.Requires(()=>GitRepository.Branch.EqualsOrdinalIgnoreCase(MainBranch)||
187187
GitRepository.Branch.EqualsOrdinalIgnoreCase(DevelopBranch)||
188188
GitRepository.Branch.StartsWithOrdinalIgnoreCase(ReleaseBranchPrefix)||
189189
GitRepository.Branch.StartsWithOrdinalIgnoreCase(HotfixBranchPrefix))

‎build/FixedAzurePipelinesAttribute.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ static AzurePipelinesStage RemovePublishAndPackJobs(AzurePipelinesStage stage)
3939
returnstage;
4040
}
4141

42-
protectedoverrideAzurePipelinesJobGetJob(ExecutableTargetexecutableTarget,LookupTable<ExecutableTarget,AzurePipelinesJob>jobs)
42+
protectedoverrideAzurePipelinesJobGetJob(ExecutableTargetexecutableTarget,LookupTable<ExecutableTarget,AzurePipelinesJob>jobs,IReadOnlyCollection<ExecutableTarget>relevantTargets)
4343
{
44-
varjob=base.GetJob(executableTarget,jobs);
44+
varjob=base.GetJob(executableTarget,jobs,relevantTargets);
4545

4646
vardownloads=(fromdepinjob.Dependencies
4747
frompubindep.PublishArtifacts

‎build/_build.csproj‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
<TargetFramework>net5.0</TargetFramework>
66
<NoWarn>CS0649;CS0169</NoWarn>
77
<NukeRootDirectory>..</NukeRootDirectory>
88
<NukeScriptDirectory>..</NukeScriptDirectory>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReferenceInclude="Nuke.Common"Version="0.24.7" />
12+
<PackageReferenceInclude="Nuke.Common"Version="0.24.11" />
1313
<PackageDownloadInclude="GitVersion.Tool"Version="[5.1.1]" />
1414
<PackageReferenceInclude="OpenCover"Version="4.7.922" />
1515
<PackageReferenceInclude="ReportGenerator"Version="4.5.4" />
1616
</ItemGroup>
1717

18+
<ItemGroup>
19+
<ContentInclude="..\.github\workflows\web-app.yaml">
20+
<Link>ci\web-app.yaml</Link>
21+
</Content>
22+
</ItemGroup>
23+
1824
</Project>

‎src/Glob/Glob.csproj‎

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<PackageId>Glob</PackageId>
99
<PackageTags>C#;glob;minimatch</PackageTags>
1010
<Description>A C# Glob library for .NET and .NET Core.</Description>
11-
<PackageReleaseNotes>https://github.com/kthompson/glob/blob/master/ChangeLog.md</PackageReleaseNotes>
11+
<PackageReleaseNotes>https://github.com/kthompson/glob/blob/main/ChangeLog.md</PackageReleaseNotes>
1212
<PackageProjectUrl>https://github.com/kthompson/glob/</PackageProjectUrl>
1313
<PackageLicense>
1414
The MIT License (MIT)
1515

16-
Copyright (c) 2013-2020 Kevin Thompson
16+
Copyright (c) 2013-2021 Kevin Thompson and Glob contributors
1717

1818
Permission is hereby granted, free of charge, to any person obtaining a copy of
1919
this software and associated documentation files (the "Software"), to deal in
@@ -45,39 +45,15 @@
4545
<RootNamespace>GlobExpressions</RootNamespace>
4646
<LangVersion>latest</LangVersion>
4747
<Nullable>enable</Nullable>
48+
<TargetFramework>net5.0</TargetFramework>
4849
</PropertyGroup>
4950

50-
<PropertyGroupCondition=" '$(OS)' != 'Windows_NT'">
51-
<TargetFrameworks>netstandard1.3;netstandard2.0;</TargetFrameworks>
52-
</PropertyGroup>
53-
54-
<PropertyGroupCondition=" '$(OS)' == 'Windows_NT'">
55-
<TargetFrameworks>net40;net45;net46;netstandard1.3;netstandard2.0;netcoreapp3.0</TargetFrameworks>
51+
<PropertyGroupCondition=" '$(Configuration)' == 'Debug'">
52+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
5653
</PropertyGroup>
5754

58-
<PropertyGroupCondition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard1.3|AnyCPU'">
55+
<PropertyGroupCondition="'$(Configuration)' =='Release'">
5956
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
60-
<WarningsAsErrors />
6157
</PropertyGroup>
6258

63-
<ItemGroupCondition=" '$(TargetFramework)' == 'netstandard1.3'">
64-
<PackageReferenceInclude="System.Linq"Version="4.3.0" />
65-
<PackageReferenceInclude="System.Collections"Version="4.3.0" />
66-
</ItemGroup>
67-
68-
<ItemGroupCondition=" '$(TargetFramework)' == 'net40'">
69-
<ReferenceInclude="System" />
70-
<ReferenceInclude="Microsoft.CSharp" />
71-
</ItemGroup>
72-
73-
<ItemGroupCondition=" '$(TargetFramework)' == 'net45'">
74-
<ReferenceInclude="System" />
75-
<ReferenceInclude="Microsoft.CSharp" />
76-
</ItemGroup>
77-
78-
<ItemGroupCondition=" '$(TargetFramework)' == 'net46'">
79-
<ReferenceInclude="System" />
80-
<ReferenceInclude="Microsoft.CSharp" />
81-
<PackageReferenceInclude="System.IO.FileSystem"Version="4.3.0" />
82-
</ItemGroup>
8359
</Project>

‎src/Glob/Parser.cs‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ private string GetSpelling()
2525
{
2626
try
2727
{
28+
if(_spelling.Length==0)
29+
{
30+
// Did not consume a character
31+
thrownewGlobPatternException($"Unexpected character{(char)_currentCharacter} at index{_sourceIndex}");
32+
}
2833
return_spelling.ToString();
2934
}
3035
finally
@@ -76,8 +81,13 @@ private LiteralSet ParseLiteralSet()
7681
{
7782
varitems=newList<Identifier>();
7883
this.SkipIt();// {
79-
items.Add(this.ParseIdentifier(true));
8084

85+
if(this._currentCharacter=='}')
86+
{
87+
thrownewGlobPatternException($"Expected literal at index{_sourceIndex}. Literal sets cannot be empty.");
88+
}
89+
90+
items.Add(this.ParseIdentifier(true));
8191
while(this._currentCharacter==',')
8292
{
8393
this.SkipIt();// ,

‎src/GlobApp/App.razor‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<RouterAppAssembly="@typeof(Program).Assembly">
2+
<FoundContext="routeData">
3+
<RouteViewRouteData="@routeData"DefaultLayout="@typeof(MainLayout)" />
4+
</Found>
5+
<NotFound>
6+
<LayoutViewLayout="@typeof(MainLayout)">
7+
<p>Sorry, there's nothing at this address.</p>
8+
</LayoutView>
9+
</NotFound>
10+
</Router>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp