From f0d97d63cf41697cabbf78281864eae745689a85 Mon Sep 17 00:00:00 2001 From: rhysd Date: Wed, 4 Oct 2023 08:56:05 +0900 Subject: [PATCH 1/2] Associate `*.sarif` files with `json` syntax --- src/syntax_mapping.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs index d4331bb818..c8c361ab65 100644 --- a/src/syntax_mapping.rs +++ b/src/syntax_mapping.rs @@ -76,9 +76,9 @@ impl<'a> SyntaxMapping<'a> { .insert("fish_history", MappingTarget::MapTo("YAML")) .unwrap(); - mapping - .insert("*.jsonl", MappingTarget::MapTo("JSON")) - .unwrap(); + for glob in ["*.jsonl", "*.sarif"] { + mapping.insert(glob, MappingTarget::MapTo("JSON")).unwrap(); + } // See #2151, https://nmap.org/book/nse-language.html mapping From 4b6dac0bb4ca61933184398202ae312840b73c18 Mon Sep 17 00:00:00 2001 From: rhysd Date: Wed, 4 Oct 2023 09:03:34 +0900 Subject: [PATCH 2/2] Update changelog for #2695 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d921f9bb09..e017a49f92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Associate `Containerfile` with `Dockerfile` syntax, see #2606 (@einfachIrgendwer0815) - Replaced quotes with double quotes so fzf integration example script works on windows and linux. see #2095 (@johnmatthiggins) - Associate `ksh` files with `bash` syntax, see #2633 (@johnmatthiggins) +- Associate `sarif` files with `JSON` syntax, see #2695 (@rhysd) - Associate `ron` files with `rust` syntax, see #2427 (@YeungOnion) ## Themes