Skip to content

Commit

Permalink
#27: Introduced TODO finding pattern for csproj files
Browse files Browse the repository at this point in the history
It searches for TODOs in *.csproj files
  • Loading branch information
MarcinCelej committed Jan 7, 2024
1 parent 7574696 commit f261b78
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- TODO: Add more target frameworks: -->
<!-- TODO: Add more target frameworks -->
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RunCodeAnalysis>false</RunCodeAnalysis>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

Total: 3

## [Synergy.Documentation.Annotations.csproj](../../../Synergy.Documentation.Annotations/Synergy.Documentation.Annotations.csproj)
- TODO: Add more target frameworks -->

## [TodoPattern.cs](../../../Synergy.Documentation/Todos/Patterns/TodoPattern.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 14-04-2023]: Add way to exclude some files from the scan - by path

## [TodoExplorer.cs](../../../Synergy.Documentation/Todos/TodoExplorer.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 26-12-2023]: Introduce md todo pattern: [//]: # (TODO Convert this markdown to docs as code)
- TODO: Marcin Celej [from: Marcin Celej on: 06-01-2024]: Introduce .csproj pattern
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@
- TodoExtractor: Func<Match, string> { get; set; }
- ctor()

## Todos.Patterns.CsprojTodoPattern (record) : TodoPattern, IEquatable<TodoPattern>, IEquatable<CsprojTodoPattern>
- FileExtension: string { get; set; }
- Regex: Regex { get; set; }
- TodoExtractor: Func<Match, string> { get; set; }
- ctor()

## Todos.Patterns.GherkinTodoPattern (record) : TodoPattern, IEquatable<TodoPattern>, IEquatable<GherkinTodoPattern>
- FileExtension: string { get; set; }
- Regex: Regex { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Synergy.Documentation.Tests.Comments;

public class NoteTests
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Text.RegularExpressions;

namespace Synergy.Documentation.Todos.Patterns;

public record CsprojTodoPattern() : TodoPattern(
"csproj",
new Regex("(TODO.*)"),
match => match.Groups[1]
.Value
);
4 changes: 2 additions & 2 deletions Documentation/Synergy.Documentation/Todos/TodoExplorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public static class TodoExplorer
{
new CsharpTodoPattern(),
new GherkinTodoPattern(),
new TextTodoPattern()
new TextTodoPattern(),
new CsprojTodoPattern()
// TODO: Marcin Celej [from: Marcin Celej on: 26-12-2023]: Introduce md todo pattern: [//]: # (TODO Convert this markdown to docs as code)
// TODO: Marcin Celej [from: Marcin Celej on: 06-01-2024]: Introduce .csproj pattern
};

public static string DebtFor(
Expand Down

0 comments on commit f261b78

Please sign in to comment.