Skip to main content

JSAdapter

Struct JSAdapter 

Source
pub struct JSAdapter;

Trait Implementations§

Source§

impl LanguageAdapter for JSAdapter

Source§

fn language(&self) -> Language

Source§

fn query_patterns(&self) -> &[&str]

Return merged tree-sitter query patterns for this language. Read more
Source§

fn count_panic_calls(&self, file: &ParsedFile) -> usize

Source§

fn extract_functions(&self, file: &ParsedFile) -> Vec<FunctionNode>

Source§

fn max_nesting_depth(&self, file: &ParsedFile) -> usize

Source§

fn count_naming_violations(&self, file: &ParsedFile) -> usize

Source§

fn count_deeply_nested_blocks(&self, file: &ParsedFile) -> usize

Source§

fn count_debug_calls(&self, file: &ParsedFile) -> usize

Source§

fn count_excessive_params(&self, file: &ParsedFile, threshold: usize) -> usize

Source§

fn count_magic_numbers(&self, file: &ParsedFile) -> usize

Source§

fn count_dead_code(&self, file: &ParsedFile) -> usize

Count dead code blocks — unreachable code after return/break/continue/panic.
Source§

fn count_duplicate_imports(&self, file: &ParsedFile) -> usize

Count duplicate import statements in a file (language-specific).
Source§

fn count_js_issues(&self, file: &ParsedFile) -> usize

Count JavaScript code issues: eval, with, ==/var, alert.
Source§

fn count_panic_from_batch<'a>( &self, _file: &ParsedFile, batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn extract_functions_from_batch<'a>( &self, _file: &ParsedFile, batch: &[Vec<QueryCapture<'a>>], ) -> Vec<FunctionNode>

Source§

fn count_naming_from_batch<'a>( &self, _file: &ParsedFile, batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_debug_from_batch<'a>( &self, _file: &ParsedFile, batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_excessive_from_batch<'a>( &self, _file: &ParsedFile, batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_magic_from_batch<'a>( &self, _file: &ParsedFile, batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_unsafe_blocks(&self, file: &ParsedFile) -> usize

Source§

fn count_goroutine_spawns(&self, file: &ParsedFile) -> usize

Count goroutine spawns (Go-specific).
Source§

fn count_defer_in_loop(&self, file: &ParsedFile) -> usize

Count defer statements inside for loops (Go-specific).
Source§

fn count_go_convention_violations(&self, file: &ParsedFile) -> usize

Count Go convention violations: uppercase error strings, context.Context not first param, if-else with return.
Source§

fn count_python_issues(&self, file: &ParsedFile) -> usize

Count Python-specific code issues: wildcard imports, redundant bool comparisons, identity comparison violations, type:ignore comments, legacy string formatting, custom dunder methods, import order.
Source§

fn count_java_issues(&self, file: &ParsedFile) -> usize

Count Java-specific code issues: empty catch, missing javadoc, try-finally close, string concat in loop, wildcard imports.
Source§

fn count_ruby_issues(&self, file: &ParsedFile) -> usize

Count Ruby-specific code issues: global variables, bare rescue, missing frozen_string_literal, negated if, predicate naming, indent.
Source§

fn count_c_issues(&self, file: &ParsedFile) -> usize

Count C/C++ code issues: goto, new-expression, sizeof-type, free-mismatch, malloc-check.
Source§

fn count_ts_issues(&self, file: &ParsedFile) -> usize

Count TypeScript code issues: any-type, prefer-interface, no-enum.
Source§

fn count_swift_issues(&self, file: &ParsedFile) -> usize

Count Swift code issues: force-unwrap, try!, implicitly unwrapped optionals.
Source§

fn count_commented_out_code(&self, file: &ParsedFile) -> usize

Count commented-out code blocks in the file. Default implementation uses content-based detection.
Source§

fn count_todo_markers(&self, file: &ParsedFile) -> usize

Count TODO/FIXME/BUG/HACK markers in comments. Default implementation uses content-based detection.
Source§

fn batch_captures<'a>(&self, file: &'a ParsedFile) -> Vec<Vec<QueryCapture<'a>>>

Run all query patterns in a single cursor traversal. Read more
Source§

fn compute_all(&self, file: &ParsedFile) -> AdapterCounts

Compute all adapter counts in a single batch pass. Read more
Source§

fn count_unsafe_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_goroutine_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_go_convention_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_python_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_java_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_ruby_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_c_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_ts_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_js_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Source§

fn count_swift_from_batch<'a>( &self, file: &ParsedFile, _batch: &[Vec<QueryCapture<'a>>], ) -> usize

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,