You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: linter.rs
    path of file: ./repos/oxc/crates/oxc_linter/examples
    
    the code of the file until where you have to start completion: //! The simplest linter

use std::{env, path::Path};

use oxc_allocator::Allocator;
use oxc_ast::AstKind;
use oxc_diagnostics::{
    miette::{self, Diagnostic},
    thiserror::Error,
};
use oxc_parser::Parser;
use oxc_semantic::SemanticBuilder;
use oxc_span::{SourceType, Span};

// Instruction:
// create a `test.js`,
// run `cargo run -p oxc_linter --example linter`
// or `cargo watch -x "run -p oxc_linter --example linter"`

fn main() -> std::io::Result<()> {
    let name = env::args().nth(1).unwrap_or_else(|| "test.js".to_string());
    let path = Path::new(&name);
    let source_text = std::fs::read_to_string(path)?;
    let allocator = Allocator::default();
    let source_type = SourceType::from_path(path).unwrap();
    let ret = Parser::new(&allocator, &source_text, source_type).parse();

    // Handle parser errors
    if !ret.errors.is_empty() {
        print_errors(&source_text, ret.errors);
        return Ok(());
    }

    let program = allocator.alloc(ret.program);
    let semantic_ret =
        SemanticBuilder::new(&source_text, source_type).with_trivias(ret.trivias).
    
fn main() -> std::io::Result<()> {
    let name = env::args().nth(1).unwrap_or_else(|| "test.js".to_string());
    let path = Path::new(&name);
    let source_text = std::fs::read_to_string(path)?;
    let allocator = Allocator::default();
    let source_type = SourceType::from_path(path).unwrap();
    let ret = Parser::new(&allocator, &source_text, source_type).parse();

    // Handle parser errors
    if !ret.errors.is_empty() {
        print_errors(&source_text, ret.errors);
        return Ok(());
    }

    let program = allocator.alloc(ret.program);
    let semantic_ret =
        SemanticBuilder::new(&source_text, source_type).with_trivias(ret.trivias).build(program);

    let mut errors: Vec<oxc_diagnostics::Error> = vec![];

    for node in semantic_ret.semantic.nodes().iter() {
        match node.kind() {
            AstKind::DebuggerStatement(stmt) => {
                errors.push(NoDebugger(stmt.span).into());
            }
            AstKind::ArrayPattern(array) if array.elements.is_empty() => {
                errors.push(NoEmptyPattern("array", array.span).into());
            }
            AstKind::ObjectPattern(object) if object.properties.is_empty() => {
                errors.push(NoEmptyPattern("object", object.span).into());
            }
            _ => {}
        }
    }

    if errors.is_empty() {
        println!("Success!");
    } else {
        print_errors(&source_text, errors);
    }

    Ok(())
}