Ban XXX, TBD, FIXME comments (#6486)
This commit is contained in:
parent
b38bf90de7
commit
3fb70b8d47
22
ci/nits.sh
22
ci/nits.sh
|
@ -44,3 +44,25 @@ fi
|
|||
if _ git --no-pager grep -n 'Default::default()' -- '*.rs'; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Github Issues should be used to track outstanding work items instead of
|
||||
# marking up the code
|
||||
#
|
||||
# Ref: https://github.com/solana-labs/solana/issues/6474
|
||||
declare useGithubIssueInsteadOf=(
|
||||
'XXX'
|
||||
'TBD'
|
||||
'FIXME'
|
||||
#'TODO' # TODO: Uncomment this line to disable TODOs
|
||||
)
|
||||
|
||||
if _ git --no-pager grep -n --max-depth=0 "${useGithubIssueInsteadOf[@]/#/-e }" -- '*.rs' '*.sh'; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TODO: Remove this `git grep` once TODOs are banned above
|
||||
# (this command is only used to highlight the current offenders)
|
||||
_ git --no-pager grep -n --max-depth=0 "-e TODO" -- '*.rs' '*.sh' || true
|
||||
echo "^^^ +++"
|
||||
# END TODO
|
||||
|
|
|
@ -222,7 +222,7 @@ colo_machine_types_compatible() {
|
|||
declare MAYBE_MACH="$1"
|
||||
declare WANT_MACH="$2"
|
||||
declare COMPATIBLE=false
|
||||
# XXX: Colo machine types are just GPU count ATM...
|
||||
# Colo machine types are just GPU count ATM...
|
||||
if [[ "$MAYBE_MACH" -ge "$WANT_MACH" ]]; then
|
||||
COMPATIBLE=true
|
||||
fi
|
||||
|
|
|
@ -272,7 +272,7 @@ pub fn bind_in_range(range: PortRange) -> io::Result<(u16, UdpSocket)> {
|
|||
// binds many sockets to the same port in a range
|
||||
pub fn multi_bind_in_range(range: PortRange, mut num: usize) -> io::Result<(u16, Vec<UdpSocket>)> {
|
||||
if cfg!(windows) && num != 1 {
|
||||
// TODO: Can we do better for windows?
|
||||
// See https://github.com/solana-labs/solana/issues/4607
|
||||
warn!(
|
||||
"multi_bind_in_range() only supports 1 socket in windows ({} requested)",
|
||||
num
|
||||
|
|
|
@ -786,7 +786,7 @@ impl Bank {
|
|||
/// bank will reject transactions using that `hash`.
|
||||
pub fn register_tick(&self, hash: &Hash) {
|
||||
if self.is_frozen() {
|
||||
warn!("=========== FIXME: register_tick() working on a frozen bank! ================");
|
||||
warn!("=========== TODO: register_tick() working on a frozen bank! ================");
|
||||
}
|
||||
|
||||
// TODO: put this assert back in
|
||||
|
@ -822,7 +822,7 @@ impl Bank {
|
|||
iteration_order: Option<Vec<usize>>,
|
||||
) -> TransactionBatch<'a, 'b> {
|
||||
if self.is_frozen() {
|
||||
warn!("=========== FIXME: lock_accounts() working on a frozen bank! ================");
|
||||
warn!("=========== TODO: lock_accounts() working on a frozen bank! ================");
|
||||
}
|
||||
// TODO: put this assert back in
|
||||
// assert!(!self.is_frozen());
|
||||
|
@ -1152,7 +1152,7 @@ impl Bank {
|
|||
signature_count: u64,
|
||||
) -> Vec<Result<()>> {
|
||||
if self.is_frozen() {
|
||||
warn!("=========== FIXME: commit_transactions() working on a frozen bank! ================");
|
||||
warn!("=========== TODO: commit_transactions() working on a frozen bank! ================");
|
||||
}
|
||||
|
||||
self.increment_transaction_count(tx_count);
|
||||
|
|
Loading…
Reference in New Issue