aws-samples / policy-as-code
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 38 files with 2,630 lines of code.
    • 0 very long files (0 lines of code)
    • 0 long files (0 lines of code)
    • 3 medium size files (934 lines of codeclsfd_ftr_w_mp_ins)
    • 2 small files (236 lines of code)
    • 33 very small files (1,460 lines of code)
0% | 0% | 35% | 8% | 55%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
ts0% | 0% | 79% | 0% | 20%
yml0% | 0% | 54% | 0% | 45%
py0% | 0% | 30% | 11% | 58%
rego0% | 0% | 0% | 20% | 79%
tf0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
yaml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
cdk/ide/lib0% | 0% | 79% | 0% | 20%
cdk/ide0% | 0% | 78% | 0% | 21%
cdk/app/awsconfig0% | 0% | 94% | 0% | 5%
terraform/app/custom-rules0% | 0% | 0% | 20% | 79%
cdk/ide/lambda_functions0% | 0% | 0% | 49% | 50%
cdk/cicd0% | 0% | 0% | 0% | 100%
terraform/cicd0% | 0% | 0% | 0% | 100%
cdk/app0% | 0% | 0% | 0% | 100%
content/pac_tools/checkov0% | 0% | 0% | 0% | 100%
cdk/cicd/pipeline_delivery0% | 0% | 0% | 0% | 100%
terraform/cicd/pipeline_delivery0% | 0% | 0% | 0% | 100%
utils0% | 0% | 0% | 0% | 100%
terraform/app0% | 0% | 0% | 0% | 100%
cdk/app/rules0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Longest Files (Top 38)
File# lines# units
ide-stack.ts
in cdk/ide/lib
329 1
cloud9.yml
in cdk/ide
304 -
S3_block_public_access.py
in cdk/app/awsconfig
301 24
rego
bucket_is_public.rego
in terraform/app/custom-rules/s3
125 -
lambda_function.py
in cdk/ide/lambda_functions/c9DiskResize
111 8
rego
bucket_config_public_read.rego
in terraform/app/custom-rules/s3
100 -
Base.py
in terraform/cicd
91 2
cluster-stack.ts
in cdk/ide/lib
86 1
Pipeline.py
in cdk/cicd
86 1
Base.py
in cdk/cicd
76 2
s3_deployment.py
in cdk/app
75 1
Pipeline.py
in terraform/cicd
71 1
rego
https_access.rego
in terraform/app/custom-rules/s3
70 -
lambda_function.py
in cdk/ide/lambda_functions/c9bootstrap
68 6
rego
bucketpolicy_allowall.rego
in terraform/app/custom-rules/s3
66 -
rego
bucketpolicy_allowlist.rego
in terraform/app/custom-rules/s3
65 -
rego
block_public_access.rego
in terraform/app/custom-rules/s3
60 -
rego
key_not_public.rego
in terraform/app/custom-rules/kms
55 -
lambda_function.py
in cdk/ide/lambda_functions/c9InstanceProfile
45 4
rego
bucket_sse.rego
in terraform/app/custom-rules/s3
42 -
buildspec.yml
in cdk/ide
41 -
cfn.yml
in content/pac_tools/checkov/scanning
41 -
s3_force_delete.py
in utils
38 2
rego
key_rotation.rego
in terraform/app/custom-rules/kms
35 -
buildspec-destroy.yml
in cdk/ide
33 -
main.tf
in terraform/app
33 -
docker_build_buildspec.yml
in cdk/cicd/pipeline_delivery
29 -
docker_build_buildspec.yml
in terraform/cicd/pipeline_delivery
23 -
checkov-config.yml
in cdk/app/rules/checkov
18 -
checkov-config.yml
in cdk/app/awsconfig/rules/checkov
18 -
config.yml
in content/pac_tools/checkov/scanning
17 -
scan_buildspec.yml
in terraform/cicd/pipeline_delivery
16 -
scan_buildspec.yml
in cdk/cicd/pipeline_delivery
15 -
app.py
in cdk/app
15 -
app.py
in cdk/cicd
10 -
app.py
in terraform/cicd
10 -
jest.config.js
in cdk/ide
8 -
contentspec.yaml
in root
4 -
Files With Most Units (Top 12)
File# lines# units
S3_block_public_access.py
in cdk/app/awsconfig
301 24
lambda_function.py
in cdk/ide/lambda_functions/c9DiskResize
111 8
lambda_function.py
in cdk/ide/lambda_functions/c9bootstrap
68 6
lambda_function.py
in cdk/ide/lambda_functions/c9InstanceProfile
45 4
Base.py
in cdk/cicd
76 2
Base.py
in terraform/cicd
91 2
s3_force_delete.py
in utils
38 2
cluster-stack.ts
in cdk/ide/lib
86 1
ide-stack.ts
in cdk/ide/lib
329 1
Pipeline.py
in cdk/cicd
86 1
s3_deployment.py
in cdk/app
75 1
Pipeline.py
in terraform/cicd
71 1
Files With Long Lines (Top 18)

There are 18 files with lines longer than 120 characters. In total, there are 39 long lines.

File# lines# units# long lines
S3_block_public_access.py
in cdk/app/awsconfig
301 24 14
lambda_function.py
in cdk/ide/lambda_functions/c9DiskResize
111 8 4
Pipeline.py
in cdk/cicd
86 1 2
rego
bucketpolicy_allowall.rego
in terraform/app/custom-rules/s3
66 - 2
rego
bucketpolicy_allowlist.rego
in terraform/app/custom-rules/s3
65 - 2
rego
https_access.rego
in terraform/app/custom-rules/s3
70 - 2
rego
bucket_is_public.rego
in terraform/app/custom-rules/s3
125 - 2
buildspec.yml
in cdk/ide
41 - 1
Base.py
in cdk/cicd
76 2 1
docker_build_buildspec.yml
in cdk/cicd/pipeline_delivery
29 - 1
Base.py
in terraform/cicd
91 2 1
Pipeline.py
in terraform/cicd
71 1 1
docker_build_buildspec.yml
in terraform/cicd/pipeline_delivery
23 - 1
rego
bucket_config_public_read.rego
in terraform/app/custom-rules/s3
100 - 1
rego
block_public_access.rego
in terraform/app/custom-rules/s3
60 - 1
rego
bucket_sse.rego
in terraform/app/custom-rules/s3
42 - 1
rego
key_not_public.rego
in terraform/app/custom-rules/kms
55 - 1
rego
key_rotation.rego
in terraform/app/custom-rules/kms
35 - 1