Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ignatandrei/RSCG_TimeBombComment
Time Bomb comment for technical debt
https://github.com/ignatandrei/RSCG_TimeBombComment
Last synced: about 1 month ago
JSON representation
Time Bomb comment for technical debt
- Host: GitHub
- URL: https://github.com/ignatandrei/RSCG_TimeBombComment
- Owner: ignatandrei
- License: mit
- Created: 2021-09-14T19:07:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T16:04:28.000Z (12 months ago)
- Last Synced: 2024-04-15T03:09:42.825Z (8 months ago)
- Language: C#
- Size: 110 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- RSCG_Examples - https://github.com/ignatandrei/RSCG_TimeBombComment
README
# RSCG_TimeBombComment aka Time Bomb comment for technical debt
[![.NET](https://github.com/ignatandrei/RSCG_TimeBombComment/actions/workflows/dotnet.yml/badge.svg)](https://github.com/ignatandrei/RSCG_TimeBombComment/actions/workflows/dotnet.yml)
[![Nuget](https://img.shields.io/nuget/v/RSCG_TimeBombComment)](https://www.nuget.org/packages/RSCG_TimeBombComment/)
Reference the nuget package
```xml
```Then just add :
//TB: 2021-09-13 this is a comment transformed into an error
and you will see the error!
The general form is
//TB: yyyy-MM-dd whatever here
Now you can add
```csharp
//TODO this is just appearing in task list and as a warning
//TODO 2025-09-23 and this is going to warning
```## Examples
```cs
//TB: 2020-09-13 this is a comment transformed into an error
```will produce an error
[![Error](docs/error.png)](docs/error.png)
## Usage for technical debt
When you have a
//TODO
comment in your code, you can transform it into an error time bomb by adding the following line in your project file
//TB: yyyy-MM-dd whatever here
and on the date will produce an error when compiling the project## Usage for obsolete methods
Imagine you have a method that is obsolete and you want to remember that you have to remove it.
Just put the following line in your project file```cs
[Obsolete("should be deleted on the date on the right", TB_20210915)]
static string Test1()
{
return "asdasd";
}
```Then RSCG will create a static const boolean TB_20210915 that will be true if the date is less than 2021-09-15
Also, when you want to test something in your code, but give error if compiled with release
```csharp
//Just for debug: if(args.length>0) throw new ArgumentException();
//JFD: test
```will raise error if compiled with
dotnet build -c release
## Other Roslyn Source Code Generators
You can find more [Roslyn Source Code Generators](https://github.com/ignatandrei/rscg_examples/) at https://github.com/ignatandrei/rscg_examples/
# More Roslyn Source Code Generators
You can find more RSCG with examples at [Roslyn Source Code Generators](https://ignatandrei.github.io/RSCG_Examples/v2/)