File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ export const platformLanguageIds = [
9898 'terragrunt' ,
9999 'packer' ,
100100 'plaintext' ,
101+ 'jsonc' ,
101102] as const
102103
103104export type PlatformLanguageId = ( typeof platformLanguageIds ) [ number ]
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ export class ClassifierTrigger {
6161 go : - 0.3504 ,
6262 scala : - 0.534 ,
6363 cpp : - 0.1734 ,
64+ json : 0 ,
65+ yaml : - 0.3 ,
66+ tf : - 0.55 ,
6467 }
6568
6669 // other metadata coefficient
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ export class DependencyGraphFactory {
3434 static getDependencyGraphFromFileExtensions < K extends Keys > ( fileName : string ) : ClassType < K > {
3535 if ( fileName . endsWith ( DependencyGraphConstants . tfExt ) || fileName . endsWith ( DependencyGraphConstants . hclExt ) ) {
3636 return new languageMap [ 'terraform' ] ( 'tf' satisfies CodeWhispererConstants . PlatformLanguageId )
37+ } else if ( fileName . endsWith ( DependencyGraphConstants . jsonExt ) ) {
38+ return new languageMap [ 'cloudformation' ] ( 'json' satisfies CodeWhispererConstants . PlatformLanguageId )
3739 } else {
3840 return undefined
3941 }
@@ -53,8 +55,6 @@ export class DependencyGraphFactory {
5355 return new languageMap [ 'csharp' ] ( 'csharp' satisfies CodeWhispererConstants . PlatformLanguageId )
5456 case 'yaml' satisfies CodeWhispererConstants . PlatformLanguageId :
5557 return new languageMap [ 'cloudformation' ] ( 'yaml' satisfies CodeWhispererConstants . PlatformLanguageId )
56- case 'json' satisfies CodeWhispererConstants . PlatformLanguageId :
57- return new languageMap [ 'cloudformation' ] ( 'json' satisfies CodeWhispererConstants . PlatformLanguageId )
5858 case 'ruby' satisfies CodeWhispererConstants . PlatformLanguageId :
5959 return new languageMap [ 'ruby' ] ( 'ruby' satisfies CodeWhispererConstants . PlatformLanguageId )
6060 default :
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export class RuntimeLanguageContext {
6565 javascript : 'javascript' ,
6666 javascriptreact : 'jsx' ,
6767 json : 'json' ,
68- jsonc : 'jsonc ' ,
68+ jsonc : 'json ' ,
6969 jsx : 'jsx' ,
7070 kotlin : 'kotlin' ,
7171 packer : 'tf' ,
@@ -97,7 +97,7 @@ export class RuntimeLanguageContext {
9797 java : 'java' ,
9898 javascript : 'js' ,
9999 json : 'json' ,
100- jsonc : 'jsonc ' ,
100+ jsonc : 'json ' ,
101101 jsx : 'jsx' ,
102102 kotlin : 'kt' ,
103103 plaintext : 'txt' ,
You can’t perform that action at this time.
0 commit comments