Добавьте файлы проекта.

This commit is contained in:
2025-12-07 08:52:05 +03:00
parent 95344cd7a7
commit 226b6b6b21
118 changed files with 5249 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
using System.Reflection;
namespace SQLLinter.Core.Interfaces;
public interface IAssemblyWrapper
{
Assembly LoadFrom(string path);
Type[] GetExportedTypes(Assembly assembly);
}

View File

@@ -0,0 +1,24 @@
using SQLLinter.Common;
namespace SQLLinter.Core.Interfaces
{
public interface IConfig
{
/// <summary>
/// Уровень совместимости SQL Server
/// </summary>
int CompatibilityLevel { get; set; }
/// <summary>
/// Включенные правила.
/// Key - Название правила.
/// Value - Уровень предупреждения.
/// </summary>
Dictionary<string, RuleViolationSeverity> Rules { get; set; }
/// <summary>
/// Список сторонних плагинов.
/// </summary>
List<string> Plugins { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
using SQLLinter.Common;
namespace SQLLinter.Core.Interfaces;
public interface IExtendedRuleException : IRuleException
{
void SetEndLine(int endLine);
}

View File

@@ -0,0 +1,10 @@
namespace SQLLinter.Core.Interfaces;
public interface IFileSystemWrapper
{
bool FileExists(string path);
bool PathIsValidForLint(string path);
string CombinePath(params string[] paths);
}

View File

@@ -0,0 +1,8 @@
using System.Reflection;
namespace SQLLinter.Core.Interfaces;
public interface IFileversionWrapper
{
string GetVersion(Assembly assembly);
}

View File

@@ -0,0 +1,6 @@
namespace SQLLinter.Core.Interfaces;
public interface IGlobPatternMatcher
{
IEnumerable<string> GetResultsInFullPath(string path);
}

View File

@@ -0,0 +1,4 @@
namespace SQLLinter.Core.Interfaces;
public interface IOverride
{ }

View File

@@ -0,0 +1,9 @@
using SQLLinter.Common;
namespace SQLLinter.Core.Interfaces;
public interface IPluginHandler
{
IList<IRule> Rules { get; }
IDictionary<string, IRule> RuleWithNames { get; }
}

View File

@@ -0,0 +1,19 @@
namespace SQLLinter.Core.Interfaces.Config.Contracts;
public interface IRequestHandler<in TRequest, out TResponse> where TRequest : IRequest<TResponse>
{
TResponse Handle(TRequest request);
}
public interface IRequestHandler<in TRequest> where TRequest : IRequest
{
void Handle(TRequest message);
}
public interface IRequest
{
}
public interface IRequest<out TResponse>
{
}

View File

@@ -0,0 +1,6 @@
namespace SQLLinter.Core.Interfaces;
public interface IRuleExceptionFinder
{
IEnumerable<IExtendedRuleException> GetIgnoredRuleList(Stream fileStream);
}

View File

@@ -0,0 +1,8 @@
using SQLLinter.Common;
namespace SQLLinter.Core.Interfaces;
public interface IRuleVisitor
{
void VisitRules(string path, IEnumerable<IRuleException> igoredRules, Stream sqlFileStream);
}

View File

@@ -0,0 +1,11 @@
namespace SQLLinter.Core.Interfaces;
public interface ISqlFileProcessor
{
int FileCount { get; }
void ProcessList(List<string> filePaths);
void ProcessList(Dictionary<string, Stream> files);
void ProcessPath(string path);
}