Skip to content

Commit

Permalink
Merge pull request #52 from Sharp0802/dev
Browse files Browse the repository at this point in the history
Fix #34, #48
  • Loading branch information
Sharp0802 committed Oct 7, 2023
2 parents 326ccd8 + 3ff15f2 commit e96eea5
Show file tree
Hide file tree
Showing 36 changed files with 525 additions and 13 deletions.
15 changes: 15 additions & 0 deletions src/SIKA.Generator/ModelCtorGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
Expand Down
14 changes: 14 additions & 0 deletions src/SIKA.Test/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

await SIKA.Program.Main(
"build",
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/DirectoryInfoExtension.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

namespace SIKA.Components;

public static class DirectoryInfoExtension
Expand Down
17 changes: 16 additions & 1 deletion src/SIKA/Components/GoogleSitemapLinker.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
using System.Text;
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Text;
using System.Xml;
using System.Xml.Linq;
using SIKA.Models;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/Initializer.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.CommandLine;
using System.Reflection;
using System.Text.Json;
Expand Down
17 changes: 16 additions & 1 deletion src/SIKA/Components/LinkerBase.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Text;
using Markdig;
using Markdig.Extensions.AutoIdentifiers;
Expand Down Expand Up @@ -38,7 +53,7 @@ protected LinkerBase(Project project)
Tree = PostTree.Burn(fst);

ManglingMap = ((PostTree)Tree).Traverse().OfType<PostLeaf>().ToDictionary(
leaf => Path.GetRelativePath(project.Info.BuildDirectory, leaf.Info.FullName),
leaf => Path.GetRelativePath(project.Info.BuildDirectory, leaf.Info.FullName).Replace('\\', '/'),
leaf => leaf.GetHRef()
);

Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

namespace SIKA.Components;

public enum LogLevel
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/Preprocessor.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Text;
using Markdig;
using Markdig.Extensions.Yaml;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/RazorTemplateLinker.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Collections.Concurrent;
using System.Text;
using Markdig;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/SEH.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Security;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/ValidationHelper.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Components/Yaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using YamlDotNet.Serialization;

namespace SIKA.Components;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Contexts/SourceGenerationContext.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Text.Json.Serialization;
using SIKA.Models;

Expand Down
17 changes: 16 additions & 1 deletion src/SIKA/Models/Abstraction/IReadOnlyTree.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
namespace SIKA.Models.Abstraction;
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

namespace SIKA.Models.Abstraction;

public interface IReadOnlyTree<out TChild> : IEnumerable<TChild>;
17 changes: 16 additions & 1 deletion src/SIKA/Models/Abstraction/ITree.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
namespace SIKA.Models.Abstraction;
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

namespace SIKA.Models.Abstraction;

public interface ITree<TChild> : IReadOnlyTree<TChild>
{
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Models/Contacts.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using SIKA.Components;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Models/HeaderInfo.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using SIKA.Components;
Expand Down
17 changes: 16 additions & 1 deletion src/SIKA/Models/IO/FileSystemTree.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
using System.Collections;
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.Collections;
using SIKA.Models.Abstraction;

namespace SIKA.Models.IO;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Models/LinkReference.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using SIKA.Components;
Expand Down
15 changes: 15 additions & 0 deletions src/SIKA/Models/PostFrontMatter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (C) 2023 Yeong-won Seo
//
// SIKA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SIKA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SIKA. If not, see <https://www.gnu.org/licenses/>.

using System.ComponentModel.DataAnnotations;
using SIKA.Components;
using YamlDotNet.Serialization;
Expand Down
Loading

0 comments on commit e96eea5

Please sign in to comment.