Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(awslint): include types from submodules during linting (WIP) #26942

Closed
wants to merge 77 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
dd52f5f
Include types deom submodules in awslint.
Aug 30, 2023
e4ea967
fix(core): undeprecate `addWarning` (#26943)
rix0rrr Aug 30, 2023
6ef2530
docs(redshift): add details on cluster resizing (#26928)
msambol Aug 30, 2023
767d619
fix(elasticloadbalancingv2): remove equality check for health thresho…
msambol Aug 31, 2023
7bf190a
chore(deps): bump certifi from 2023.5.7 to 2023.7.22 in /packages/@aw…
dependabot[bot] Aug 31, 2023
693a375
fix(custom-resources): cross-environment call fails in opt-in region …
scanlonp Aug 31, 2023
b2bdbb7
chore: update Contributors File (#26961)
aws-cdk-automation Sep 1, 2023
64d72fd
revert: "feat(dynamodb): global table L2" (#26960)
colifran Sep 1, 2023
e1d9c95
chore(integ-tests-alpha): add redshift serverless to sdk api metadata…
msambol Sep 1, 2023
ba786ec
feat(synthetics-alpha): add latest two NodeJS runtimes (#26967)
philipmw Sep 1, 2023
0d2cf25
docs(cloudwatch): Both `defaultInterval` and `start` for dashboard ca…
go-to-k Sep 1, 2023
d39189c
chore(release): 2.94.0
Sep 1, 2023
c169d8a
chore: update changelog
vinayak-kukreja Sep 1, 2023
f43a62b
chore(deps): bump tj-actions/changed-files from 38.1.3 to 38.2.1 (#26…
dependabot[bot] Sep 4, 2023
c127d33
feat: update AWS Service Spec (#26999)
aws-cdk-automation Sep 4, 2023
159ed7e
docs(ssm): fix grammatical errors for StringParameter (#27004)
msambol Sep 5, 2023
1b8ebf4
fix(firehose): remove unused role during DeliveryStream creation (#26…
msambol Sep 5, 2023
611f66f
chore: include basic workspace file with jest configuration (#27008)
mrgrain Sep 5, 2023
5eb4e18
fix(route53): `CrossAccountZoneDelegationRecord` is still using Node …
scanlonp Sep 5, 2023
44c0a01
fix(lambda-nodejs): incorrect SDK v2 warning generated (#27014)
plumdog Sep 5, 2023
7f363c8
chore(region-info): Add missing information for all supported regions…
SankyRed Sep 5, 2023
8721a51
fix(logs): log retention custom resource timed out during deploy (#26…
mrgrain Sep 6, 2023
94b31d7
chore: remove apiVersion from custom resources (#27021)
kaizencc Sep 6, 2023
83053c8
fix(custom-resources): empty Lambda response payload causes deploymen…
rix0rrr Sep 6, 2023
ee3a8d7
fix(integ-tests): Uint8Arrays are not decoded properly (#27009)
otaviomacedo Sep 6, 2023
1626d09
docs(apprunner): fix typo in AuthenticationConfiguration (#27027)
go-to-k Sep 6, 2023
d832427
fix(events-targets): AwsApi is still using Node 16 (#27002)
mrgrain Sep 6, 2023
e1c1994
chore: replace Node16 runtimes in unit tests with symbolic runtime (#…
rix0rrr Sep 6, 2023
2ebdc76
chore: npm-check-updates && yarn upgrade (#27032)
aws-cdk-automation Sep 6, 2023
6c26d70
chore(ec2): add verified permissions vpc interface endpoint (#27026)
clueleaf Sep 6, 2023
3a3aab2
feat(dynamodb): TableV2 supports imports, drift detection, and better…
colifran Sep 6, 2023
4a1d31b
fix(cli): deployment stops on AccessDenied looking up bootstrap stack…
rix0rrr Sep 7, 2023
a35d425
chore: update SDKv3 blob types model (#27043)
rix0rrr Sep 7, 2023
170a270
fix(events-targets): AwsApi fails when SDKv3 Command expects Uint8Arr…
mrgrain Sep 7, 2023
90dedca
feat(stepfunctions): properties for ErrorPath, CausePath, MaxDelay, J…
kaizencc Sep 7, 2023
8dbe23d
chore(release): 2.95.0
Sep 7, 2023
945e03c
fix(dynamodb): update CfnGlobalTable in TableV2 constructor to use th…
colifran Sep 8, 2023
3ed234e
chore(release): 2.95.1
MrArnoldPalmer Sep 8, 2023
fc6f80e
chore: use error name string in handlers (#27056)
MrArnoldPalmer Sep 8, 2023
beb18dd
chore: move AwsCustomResource to the custom resource handlers package…
rix0rrr Sep 8, 2023
3968e39
docs(backup): default value for completionWindow is incorrect (#27061)
tam0ri Sep 8, 2023
acf9acb
fix(custom-resources): AwsCustomResource fails when SDKv3 expects Uin…
rix0rrr Sep 8, 2023
2d058b5
fix(route53): timeouts due to delete-existing-record-set-handler's wa…
kaizencc Sep 8, 2023
f3f70a8
fix(custom-resources): maxwaittime reduced to 60 seconds from 300 sec…
kaizencc Sep 8, 2023
6db7164
feat(batch): Stabilize Batch (#27059)
comcalvi Sep 9, 2023
9bb7b11
feat(ecs): add Amazon Linux 2023 to EcsOptimizedImage (#26989)
layertwo Sep 9, 2023
e5c663e
chore: call out requirement for allowing commits to your pr branch in…
kaizencc Sep 9, 2023
24424b3
docs(ecs): remove restriction regarding environment files against Far…
tam0ri Sep 9, 2023
c6fce3a
refactor(lambda): use lowercase boolean for type declarations (#27082)
yodeee9 Sep 9, 2023
7a11bf0
chore: Uint8Array map was not traversing maps and unions (#27071)
rix0rrr Sep 10, 2023
f149db6
fix(codedeploy): CustomLambdaDeploymentConfig is broken (#27087)
rix0rrr Sep 11, 2023
63dc879
chore(deps): bump tj-actions/changed-files from 38.2.1 to 39.0.1 (#27…
dependabot[bot] Sep 11, 2023
cbeecf3
chore(deps): bump actions/checkout from 3 to 4 (#27091)
dependabot[bot] Sep 11, 2023
fe76f95
chore(integ-tests): Applying type coercion to byte array when necessa…
otaviomacedo Sep 11, 2023
69fd46f
chore(globalaccelerator): add integ test for Global Accelerator with …
mrgrain Sep 11, 2023
926530a
feat(glue): add ExternalTable for use with connections (#24753)
Rizxcviii Sep 11, 2023
3385e92
feat: update AWS Service Spec (#27095)
aws-cdk-automation Sep 11, 2023
e3e25f9
fix(synthetics): include auto-delete-underlying-resources in package …
kaizencc Sep 11, 2023
96361c5
fix(lambda): update default runtimes and tests to node 18 (#27066)
mrgrain Sep 11, 2023
608aec9
chore: github actions do not accept node18 (#27104)
kaizencc Sep 11, 2023
ff77b42
chore(msk): integ test for zookeeper connect custom resource (#27102)
kaizencc Sep 11, 2023
9028eeb
chore(aws-cdk-lib): airlift stable custom resource handlers only (#27…
kaizencc Sep 12, 2023
f740906
chore(msk): integ test for batch associate scram secrets custom resou…
colifran Sep 12, 2023
3373090
docs(stepfunctions): replace definition with definitionBody in readm …
ymhiroki Sep 12, 2023
a1a263b
chore(ecs): clarify it's possible to use image digest on fromEcrRepos…
clueleaf Sep 12, 2023
8a03403
chore(amplify): missing integ test for AWS Amplify (#27107)
SankyRed Sep 12, 2023
9eb00b9
chore: add integ test for cross-region refs (#27118)
MrArnoldPalmer Sep 12, 2023
5bbf07c
chore: fix minimatch imports (#27116)
rix0rrr Sep 13, 2023
8b6ff36
fix(codepipeline-actions): update zip to noncorrupted one (#27120)
msambol Sep 13, 2023
20399b2
fix(triggers): errors are shown as list of bytes (#27119)
mrgrain Sep 13, 2023
9bafd63
docs(codepipeline): add note about repoString param resolvability at …
Nikola-Milovic Sep 13, 2023
17e39d2
fix(integ-tests): use transformToString on API call response body (#2…
colifran Sep 13, 2023
3bab59f
chore(release): 2.96.0
Sep 13, 2023
75b82a3
fix(custom-resources): does not accept strings where numbers are expe…
otaviomacedo Sep 14, 2023
136c379
revert: "chore(ecs): clarify it's possible to use image digest on fro…
sumupitchayan Sep 14, 2023
e040ab5
awslint fixes.
Sep 14, 2023
35dc903
Add awslint exclusions after linter fixes.
Sep 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/awslint/lib/rules/cfn-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class CfnResourceReflection {
* Returns all CFN resource classes within an assembly.
*/
public static findAll(assembly: reflect.Assembly) {
return assembly.classes
return assembly.allClasses
.filter(c => CoreTypes.isCfnResource(c))
.map(c => new CfnResourceReflection(c));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/awslint/lib/rules/construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import * as reflect from 'jsii-reflect';
import { CoreTypes } from './core-types';
import { Linter, MethodSignatureParameterExpectation } from '../linter';

export const constructLinter = new Linter<ConstructReflection>(assembly => assembly.classes
export const constructLinter = new Linter<ConstructReflection>(assembly => assembly.allClasses
.filter(t => CoreTypes.isConstructClass(t))
.map(construct => new ConstructReflection(construct)));

export class ConstructReflection {

public static findAllConstructs(assembly: reflect.Assembly) {
return assembly.classes
return assembly.allClasses
.filter(c => CoreTypes.isConstructClass(c))
.map(c => new ConstructReflection(c));
}
Expand Down
10 changes: 6 additions & 4 deletions packages/awslint/lib/rules/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ type DocsLinterContext = {

export const docsLinter = new Linter<DocsLinterContext>(assembly => {
return [
...flatMap(assembly.classes, classType => [
...flatMap(assembly.allClasses, classType => [
{ assembly, kind: 'type', documentable: classType, errorKey: classType.fqn },
...classType.ownProperties.map(property => ({ assembly, kind: 'class-property', containingType: classType, documentable: property, errorKey: `${classType.fqn}.${property.name}` })),
...classType.ownMethods.map(method => ({ assembly, kind: 'method', containingType: classType, documentable: method, errorKey: `${classType.fqn}.${method.name}` })),
]),
...flatMap(assembly.interfaces, interfaceType => [
...flatMap(assembly.allInterfaces, interfaceType => [
{ assembly, kind: 'type', documentable: interfaceType, errorKey: interfaceType.fqn },
...interfaceType.ownProperties.map(property => ({ assembly, kind: 'interface-property', containingType: interfaceType, documentable: property, errorKey: `${interfaceType.fqn}.${property.name}` })),
...interfaceType.ownMethods.map(method => ({ assembly, kind: 'method', containingType: interfaceType, documentable: method, errorKey: `${interfaceType.fqn}.${method.name}` })),
]),
...flatMap(assembly.enums, enumType => [
...flatMap(assembly.allEnums, enumType => [
{ assembly, kind: 'type', documentable: enumType, errorKey: enumType.fqn },
...enumType.members.map(member => ({ assembly, kind: 'enum-member', containingType: enumType, documentable: member, errorKey: `${enumType.fqn}.${member.name}` })),
]),
Expand Down Expand Up @@ -53,7 +53,9 @@ docsLinter.add({
if (e.ctx.kind !== 'interface-property') { return; }
if (!e.ctx.containingType.isDataType()) { return; }
// this rule does not apply to L1 constructs
if (CoreTypes.isCfnType(e.ctx.containingType)) { return; }
if (CoreTypes.isCfnType(e.ctx.containingType)) {
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed for debugging purposes - can revert.

}

const property = e.ctx.documentable;
e.assert(!property.optional || property.docs.docs.default !== undefined, e.ctx.errorKey);
Expand Down
2 changes: 1 addition & 1 deletion packages/awslint/lib/rules/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as reflect from 'jsii-reflect';
import { memberFqn } from './util';
import { Linter } from '../linter';

export const integrationLinter = new Linter<IntegrationReflection>(assembly => assembly.interfaces
export const integrationLinter = new Linter<IntegrationReflection>(assembly => assembly.allInterfaces
.filter(IntegrationReflection.isIntegrationInterface)
.map(construct => new IntegrationReflection(construct)));

Expand Down
2 changes: 1 addition & 1 deletion packages/awslint/lib/rules/public-static-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const UPPER_SNAKE_CASE_ALLOWED_PATTERN = new RegExp('^[A-Z0-9][A-Z0-9_]*[A-Z0-9]

export const publicStaticPropertiesLinter = new Linter(assembly => {
const result = new Array<Property>();
for (const c of assembly.classes) {
for (const c of assembly.allClasses) {
for (const property of c.allProperties) {
if (property.const && property.static) {
result.push(property);
Expand Down
Loading