apple / sourcekit-lsp
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 222 files with 14,650 lines of code.
    • 1 very long files (1,196 lines of code)
    • 1 long files (973 lines of code)
    • 15 medium size files (4,272 lines of codeclsfd_ftr_w_mp_ins)
    • 23 small files (3,210 lines of code)
    • 182 very small files (4,999 lines of code)
8% | 6% | 29% | 21% | 34%
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
swift8% | 7% | 31% | 21% | 31%
py0% | 0% | 0% | 23% | 76%
h0% | 0% | 0% | 85% | 14%
cmake0% | 0% | 0% | 0% | 100%
cpp0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
sublime-build0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
Sources/SourceKitLSP24% | 19% | 17% | 24% | 13%
Sources/SKCore0% | 0% | 62% | 15% | 22%
Sources/LanguageServerProtocol0% | 0% | 25% | 11% | 62%
Sources/SKSwiftPMWorkspace0% | 0% | 100% | 0% | 0%
Sources/SourceKitD0% | 0% | 44% | 0% | 55%
Sources/LanguageServerProtocolJSONRPC0% | 0% | 56% | 40% | 2%
Sources/LSPTestSupport0% | 0% | 73% | 0% | 26%
ROOT0% | 0% | 100% | 0% | 0%
Sources/SKTestSupport0% | 0% | 0% | 26% | 73%
Utilities0% | 0% | 0% | 90% | 9%
Sources/LSPLogging0% | 0% | 0% | 68% | 31%
Sources/sourcekit-lsp0% | 0% | 0% | 100% | 0%
Sources/SKSupport0% | 0% | 0% | 43% | 56%
Sources/BuildServerProtocol0% | 0% | 0% | 49% | 50%
Sources/Csourcekitd0% | 0% | 0% | 99% | <1%
cmake/modules0% | 0% | 0% | 0% | 100%
Sources/CSKTestSupport0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
SwiftLanguageServer.swift
in Sources/SourceKitLSP/Swift
1196 22
SourceKitServer.swift
in Sources/SourceKitLSP
973 48
SwiftPMWorkspace.swift
in Sources/SKSwiftPMWorkspace
412 3
ClangLanguageServer.swift
in Sources/SourceKitLSP/Clang
387 20
sourcekitd_uids.swift
in Sources/SourceKitD
371 -
ServerCapabilities.swift
in Sources/LanguageServerProtocol/SupportTypes
344 -
BuildSystemManager.swift
in Sources/SKCore
341 5
ClientCapabilities.swift
in Sources/LanguageServerProtocol/SupportTypes
337 -
JSONRPCConnection.swift
in Sources/LanguageServerProtocolJSONRPC
323 4
Diagnostic.swift
in Sources/SourceKitLSP/Swift
265 7
CompilationDatabase.swift
in Sources/SKCore
245 8
WorkspaceEdit.swift
in Sources/LanguageServerProtocol/SupportTypes
213 -
TestJSONRPCConnection.swift
in Sources/LSPTestSupport
212 1
ToolchainRegistry.swift
in Sources/SKCore
210 6
Package.swift
in root
208 -
BuildServerBuildSystem.swift
in Sources/SKCore
203 2
CodeCompletion.swift
in Sources/SourceKitLSP/Swift
201 6
SyntaxHighlightingTokenParser.swift
in Sources/SourceKitLSP/Swift
188 3
SKTibsTestWorkspace.swift
in Sources/SKTestSupport
187 1
CodeCompletionSession.swift
in Sources/SourceKitLSP/Swift
183 4
DocumentManager.swift
in Sources/SourceKitLSP
173 5
CapabilityRegistry.swift
in Sources/SourceKitLSP
165 -
build-script-helper.py
in Utilities
162 8
Logging.swift
in Sources/LSPLogging
157 1
SyntaxHighlightingToken.swift
in Sources/SourceKitLSP/Swift
154 -
Language.swift
in Sources/LanguageServerProtocol/SupportTypes
142 -
main.swift
in Sources/sourcekit-lsp
141 2
LSPAny.swift
in Sources/LanguageServerProtocol/SupportTypes
140 1
CommentXML.swift
in Sources/SourceKitLSP/Swift
133 2
MessageSplitting.swift
in Sources/LanguageServerProtocolJSONRPC
130 -
LineTable.swift
in Sources/SKSupport
129 1
BuildTargets.swift
in Sources/BuildServerProtocol
123 -
LanguageServer.swift
in Sources/SKCore
123 -
SKSwiftPMTestWorkspace.swift
in Sources/SKTestSupport
121 1
Toolchain.swift
in Sources/SKCore
117 1
RegistrationOptions.swift
in Sources/LanguageServerProtocol/SupportTypes
115 1
SemanticRefactoring.swift
in Sources/SourceKitLSP/Swift
111 3
sourcekitd_functions.h
in Sources/Csourcekitd/include
108 -
CursorInfo.swift
in Sources/SourceKitLSP/Swift
105 3
MessageCoding.swift
in Sources/LanguageServerProtocolJSONRPC
103 -
Diagnostic.swift
in Sources/LanguageServerProtocol/SupportTypes
96 -
Workspace.swift
in Sources/SourceKitLSP
95 -
server.py
in Sources/SKTestSupport/INPUTS/BuildServerBuildSystemTests.testBuildTargetSources
91 -
CompilationDatabaseBuildSystem.swift
in Sources/SKCore
88 2
dlopen.swift
in Sources/SKSupport
88 1
server.py
in Sources/SKTestSupport/INPUTS/BuildServerBuildSystemTests.testBuildTargets
87 -
TestServer.swift
in Sources/SKTestSupport
80 1
VariableTypeInfo.swift
in Sources/SourceKitLSP/Swift
80 2
server.py
in Sources/SKTestSupport/INPUTS/BuildServerBuildSystemTests.testBuildTargetsChanged
76 1
sourcekitd_functions.swift
in Sources/SourceKitD
76 1
Files With Most Units (Top 20)
File# lines# units
SourceKitServer.swift
in Sources/SourceKitLSP
973 48
SwiftLanguageServer.swift
in Sources/SourceKitLSP/Swift
1196 22
ClangLanguageServer.swift
in Sources/SourceKitLSP/Clang
387 20
CompilationDatabase.swift
in Sources/SKCore
245 8
build-script-helper.py
in Utilities
162 8
a.swift
in Sources/SKTestSupport/INPUTS/Implementation
46 7
Diagnostic.swift
in Sources/SourceKitLSP/Swift
265 7
Connection.swift
in Sources/LanguageServerProtocol
72 6
ToolchainRegistry.swift
in Sources/SKCore
210 6
CodeCompletion.swift
in Sources/SourceKitLSP/Swift
201 6
BuildSystemManager.swift
in Sources/SKCore
341 5
DocumentManager.swift
in Sources/SourceKitLSP
173 5
JSONRPCConnection.swift
in Sources/LanguageServerProtocolJSONRPC
323 4
CodeCompletionSession.swift
in Sources/SourceKitLSP/Swift
183 4
SwiftPMWorkspace.swift
in Sources/SKSwiftPMWorkspace
412 3
main.cpp
in Sources/SKTestSupport/INPUTS/ClangCrashRecoveryBuildSettings
8 3
CursorInfo.swift
in Sources/SourceKitLSP/Swift
105 3
SemanticRefactoring.swift
in Sources/SourceKitLSP/Swift
111 3
SyntaxHighlightingTokenParser.swift
in Sources/SourceKitLSP/Swift
188 3
BuildServerBuildSystem.swift
in Sources/SKCore
203 2
Files With Long Lines (Top 20)

There are 41 files with lines longer than 120 characters. In total, there are 113 long lines.

File# lines# units# long lines
CodeCompletion.swift
in Sources/SourceKitLSP/Swift
201 6 12
SwiftLanguageServer.swift
in Sources/SourceKitLSP/Swift
1196 22 8
Error.swift
in Sources/LanguageServerProtocol
72 - 6
SourceKitServer.swift
in Sources/SourceKitLSP
973 48 6
TestJSONRPCConnection.swift
in Sources/LSPTestSupport
212 1 5
sourcekitd_functions.h
in Sources/Csourcekitd/include
108 - 4
ClientCapabilities.swift
in Sources/LanguageServerProtocol/SupportTypes
337 - 4
WorkspaceEdit.swift
in Sources/LanguageServerProtocol/SupportTypes
213 - 4
MessageCoding.swift
in Sources/LanguageServerProtocolJSONRPC
103 - 4
build-script-helper.py
in Utilities
162 8 4
CheckCoding.swift
in Sources/LSPTestSupport
48 - 3
Connection.swift
in Sources/LanguageServerProtocol
72 6 3
BuildServerBuildSystem.swift
in Sources/SKCore
203 2 3
SwiftPMWorkspace.swift
in Sources/SKSwiftPMWorkspace
412 3 3
sourcekitd_uids.swift
in Sources/SourceKitD
371 - 3
ClangLanguageServer.swift
in Sources/SourceKitLSP/Clang
387 20 3
SyntaxHighlightingTokenParser.swift
in Sources/SourceKitLSP/Swift
188 3 3
InitializeBuild.swift
in Sources/BuildServerProtocol
68 - 2
HoverRequest.swift
in Sources/LanguageServerProtocol/Requests
73 - 2
ServerCapabilities.swift
in Sources/LanguageServerProtocol/SupportTypes
344 - 2