mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 04:24:43 +00:00
Create .pre-commit-config.yml
This commit is contained in:
parent
fa6979fed2
commit
fa33a2003b
5 changed files with 18 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
|||
use std::env;
|
||||
// use std::env::consts::{ARCH, OS};
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader, Read, stdin};
|
||||
use std::io::{stdin, BufRead, BufReader, Read};
|
||||
use std::process;
|
||||
|
||||
// use crate::lazy::Lazy;
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::slice::{Iter, IterMut};
|
|||
use std::vec::IntoIter;
|
||||
|
||||
use crate::color::{GREEN, RESET};
|
||||
use crate::config::{ErgConfig, Input, SEMVER, GIT_HASH_SHORT, BUILD_DATE};
|
||||
use crate::config::{ErgConfig, Input, BUILD_DATE, GIT_HASH_SHORT, SEMVER};
|
||||
use crate::error::{ErrorDisplay, Location, MultiErrorDisplay};
|
||||
use crate::ty::Type;
|
||||
use crate::Str;
|
||||
|
@ -311,7 +311,10 @@ pub trait Runnable: Sized {
|
|||
fn new(cfg: ErgConfig) -> Self;
|
||||
fn input(&self) -> &Input;
|
||||
fn start_message(&self) -> String {
|
||||
format!("{} {SEMVER} (tags/?:{GIT_HASH_SHORT}, {BUILD_DATE}) on {ARCH}/{OS}\n", Self::NAME)
|
||||
format!(
|
||||
"{} {SEMVER} (tags/?:{GIT_HASH_SHORT}, {BUILD_DATE}) on {ARCH}/{OS}\n",
|
||||
Self::NAME
|
||||
)
|
||||
}
|
||||
fn finish(&mut self); // called when the :exit command is received.
|
||||
fn clear(&mut self);
|
||||
|
|
|
@ -7,7 +7,7 @@ use std::mem;
|
|||
|
||||
use erg_common::color::{GREEN, RED, RESET};
|
||||
use erg_common::config::ErgConfig;
|
||||
use erg_common::config::{Input};
|
||||
use erg_common::config::Input;
|
||||
use erg_common::error::Location;
|
||||
use erg_common::set::Set;
|
||||
use erg_common::traits::Runnable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue