Benign crates 870,629 installs Download

sqruff-lib-core 0.25.10

“Core library that underpins the sqruff library.”

Contains an unbounded block loopRust test marker or harness
SHA-256de02d17c14770be951dd6d6aed7d2f533245782947166d1d6d5c9f1a89e64130

Evidence

Contains an unbounded block loop syntax.rs · lines 774–781
774:13… m = SyntaxKind;
775
776 fn next(&mut self) -> Option<Self::Item> {
777 loop {
778 let slice = self.set.0.get_mut(self.index as usize)?;
779 let bit = slice.trailing_zeros() as u16;
780
781 …
Rust calls mem::transmute syntax.rs · lines 783–792
783:54… LICE_BITS + bit;
784 return Some(unsafe { std::mem::transmute::<u16, SyntaxKind>(value) });
785 }
786
⋯6 lines
imports std::iter::zip sequence.rs · lines 1–24
1use std::iter::zip;
2use std::ops::{Deref, DerefMut};
3
4use ahash::AHashSet;
5
6use crate::dialects::syntax::{SyntaxKind, SyntaxSet};
7use crate::errors::SQLParseError;
8use crate::helpers::ToMatchable;
9use crate::parser::context::ParseContext;
10use crate::parser::match_algorithms::{
11 resolve_bracket, skip_start_index_forward_to_code, skip_stop_index_backward_to_code,
12 trim_to_terminator,
13};
14use crate::parser::match_result::{MatchResult, Matched, Span};
15use crate::parser::matchable::{
16 next_matchable_cache_key, Matchable, MatchableCacheKey, MatchableTrait,
17};
18use crate::parser::segments::base::ErasedSegment;
19use crate::parser::types::ParseMode;
20
21fn flush_metas(
22 tpre_nc_idx: u32,
23 post_nc_idx: u32,
24 meta_buffer: Vec<SyntaxKind>, …
imports super::* base.rs · lines 590–604
590:22… | "block_end" | "block_start" | "block_mid"
591 )
592 }
593}
594
595#[cfg(test)]
596mod tests {
597 use super::*;
598
599 #[test]
600 fn test_indices_of_newlines() {
601 vec![
602 ("", vec![]),
603 ("foo", vec![]),
604 ("foo\nbar …
imports strum::IntoEnumIterator init.rs · lines 1–48
1use strum::IntoEnumIterator;
2use strum_macros::AsRefStr;
3
4#[derive(
⋯32 lines
37 DialectKind::iter()
38 .map(|x| x.as_ref().to_string())
39 .collect()
40}
41
42#[cfg(test)]
43mod tests {
44 #[test]
45 fn dialect_readout_is_alphabetically_sorted() {
46 let readout = super::dialect_readout();
47
48 let mut sorted = readout.clone();

Showing the top 5 files — 4 more files (43 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.