lint: linter fixes

This commit is contained in:
Tyler Wilding 2024-06-02 13:09:48 -04:00
parent a7a0147e99
commit 8b08d7d266
No known key found for this signature in database
GPG Key ID: BF7B068C2FEFD7EF
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ void Wrapper::clear_screen() {
repl.clear_screen();
}
void Wrapper::print_welcome_message(const std::vector<std::string> loaded_projects) {
void Wrapper::print_welcome_message(const std::vector<std::string>& loaded_projects) {
std::string message;
message += fmt::format(fmt::emphasis::bold | fg(fmt::color::orange), " ..:::::..\n");
message += fmt::format(fmt::emphasis::bold | fg(fmt::color::orange), " .:-----------:.\n");

View File

@ -38,7 +38,7 @@ class Wrapper {
// Functionality / Commands
void clear_screen();
void print_to_repl(const std::string& str);
void print_welcome_message(const std::vector<std::string> loaded_projects);
void print_welcome_message(const std::vector<std::string>& loaded_projects);
void set_history_max_size(size_t len);
const char* readline(const std::string& prompt);
void add_to_history(const std::string& line);

View File

@ -74,7 +74,7 @@ Val* Compiler::compile_define(const goos::Object& form, const goos::Object& rest
if (!existing_type) {
m_symbol_types.set(sym.as_symbol(), in_gpr->type());
} else {
if (!explicit_no_typecheck && m_repl->repl_config.permissive_redefinitions) {
if (!explicit_no_typecheck && m_repl && m_repl->repl_config.permissive_redefinitions) {
// Permissive redefinitions are allowed
if (in_gpr->type() != *existing_type) {
lg::warn("Redefining {}", sym.as_symbol().name_ptr);