refactor: remove RequiredDirectiveRule class and its implementation
This commit is contained in:
parent
8b37af4632
commit
9aaa085098
@ -1,17 +0,0 @@
|
|||||||
#include <webserv/config/validation/directive_rules/RequiredDirectiveRule.hpp>
|
|
||||||
|
|
||||||
#include <webserv/config/validation/ValidationResult.hpp> // for ValidationResult
|
|
||||||
#include <webserv/config/validation/directive_rules/AValidationRule.hpp> // for AValidationRule
|
|
||||||
|
|
||||||
RequiredDirectiveRule::RequiredDirectiveRule()
|
|
||||||
: AValidationRule("RequiredDirectiveRule", "Ensures that a required directive is present in the configuration",
|
|
||||||
true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ValidationResult RequiredDirectiveRule::validateValue(const AConfig *config, const std::string &directiveName) const
|
|
||||||
{
|
|
||||||
static_cast<void>(config); // Suppress unused parameter warning
|
|
||||||
static_cast<void>(directiveName);
|
|
||||||
return ValidationResult::success();
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <webserv/config/validation/directive_rules/AValidationRule.hpp> // for AValidationRule
|
|
||||||
|
|
||||||
#include <string> // for string
|
|
||||||
|
|
||||||
class AConfig;
|
|
||||||
|
|
||||||
class RequiredDirectiveRule : public AValidationRule
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
RequiredDirectiveRule();
|
|
||||||
|
|
||||||
private:
|
|
||||||
[[nodiscard]] ValidationResult validateValue(const AConfig *config,
|
|
||||||
const std::string &directiveName) const override;
|
|
||||||
};
|
|
||||||
Loading…
Reference in New Issue
Block a user