diff --git a/ci/nits.sh b/ci/nits.sh index ac285b8a22..961b192811 100755 --- a/ci/nits.sh +++ b/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 diff --git a/net/scripts/colo-utils.sh b/net/scripts/colo-utils.sh index 28a7137140..51dfaa3790 100644 --- a/net/scripts/colo-utils.sh +++ b/net/scripts/colo-utils.sh @@ -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 diff --git a/netutil/src/lib.rs b/netutil/src/lib.rs index a8731814d9..2321493ba4 100644 --- a/netutil/src/lib.rs +++ b/netutil/src/lib.rs @@ -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)> { 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 diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 8ed8736355..0b47b2732c 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -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>, ) -> 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> { 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);