diff options
author | dec05eba <dec05eba@protonmail.com> | 2017-12-31 09:13:32 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2017-12-31 09:29:38 +0100 |
commit | eda6a8e2c66380c773db32f720ef4b6a89f9b50a (patch) | |
tree | 6d8f5f9a6dd2d1923864f94d0df2db85d041d2d4 /include | |
parent | c849a30e7e9e2e7608376c9c538e1b45e623c805 (diff) |
Update new project template with user platform
Validate package name only contains safe characters.
TODO: Validate package name is allowed on windows, names such as NUL, AUX are not allowed
Diffstat (limited to 'include')
-rw-r--r-- | include/Conf.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/Conf.hpp b/include/Conf.hpp index d8ce3a8..f5fb382 100644 --- a/include/Conf.hpp +++ b/include/Conf.hpp @@ -141,6 +141,7 @@ namespace sibs const char* asString(Platform platform); const char* asString(OptimizationLevel optLevel); bool directoryToIgnore(const FileString &dir, const std::vector<std::string> &ignoreDirList); + bool isProjectNameValid(const std::string &projectName); class SibsConfig : public ConfigCallback { @@ -227,6 +228,8 @@ namespace sibs virtual void processObject(StringView name) override; virtual void processField(StringView name, const ConfigValue &value) override; virtual void finished() override; + private: + void validatePackageName() const; protected: StringView currentObject; Compiler compiler; |