1use std::collections::HashSet;
3use bat::HighlightingAssets;
6fn no_duplicate_extensions() {
7 const KNOWN_EXCEPTIONS: &[&'static str] = &[
8 // The '.h' extension currently appears in multiple syntaxes: C, C++, Objective C,
11 // In addition to the standard Haskell syntax in 'Packages', we also ship the 'Cabal'
12 // syntax which comes with a "Haskell (improved)" syntax.
14 // In addition to the standard JavaScript syntax in 'Packages', we also ship the
15 // 'Javascript (Babel)' syntax.
17 // The "Ruby Haml" syntax also comes with a '.sass' extension. However, we make sure
18 // that 'sass' is mapped to the 'Sass' syntax.
22 let assets = HighlightingAssets::from_binary();
24 let mut extensions = HashSet::new();
26 for syntax in assets.syntaxes() {
27 for extension in &syntax.file_extensions {
29 KNOWN_EXCEPTIONS.contains(&extension.as_str()) || extensions.insert(extension),
30 "File extension / pattern \"{}\" appears twice in the syntax set",
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list