Skip to contentSlop Block

no-abbreviations

Warning

Use full words in bindings, parameters, functions, fields and type names. id is the only allowed abbreviation.

fn run() {	let res = call();res uses an abbreviation}
fn run() {	connection.transaction(async |tx| save(tx)).await;tx uses an abbreviation}
fn handle(ctx: &Context) {}ctx uses an abbreviation
fn run() {	if let Err(e) = call() {e uses an abbreviation		log(e);	}}
fn run() {	let uuid_str = "";uuid_str uses an abbreviation}
struct Settings {	db_url: String,db_url uses an abbreviation}
trait PgPoolExt {}PgPoolExt uses an abbreviation
fn init_cfg() {}init_cfg uses an abbreviation
// ast-grep-ignore: no-abbreviations-rust

How to fix

Spell the word out: transaction for tx, context for ctx, error for e or err, result or response for res, request for req, configuration for cfg or config, connection for conn, environment for env, index for i or idx, message for msg, information for info, utilities for utils, authentication for auth, extension for ext.

id is the only abbreviation allowed. Names fixed by a language, library or protocol keep their spelling.