Added struct to attach metadata of export statements:
ExportedItem enum becomes ExportType
ExportedItemMetadata contains the ExportType and allow_unused flag, calculated during AST walk.
ExportedItemMetadata contains the span (bytepos of the export statement)
ExportedItem attaches the file path as PathBuf type.
ExportedItem attaches the file PathBuf right after ast walk since the process that finds unused exports and files removes extension from files.
TODO: add config option supress_existing_unused feature that adds // @ALLOW-UNUSED-EXPORT comment on found unused items and supress_existing_unused_message to add information to those comments.
Added struct to attach metadata of export statements:
ExportedItem
enum becomesExportType
ExportedItemMetadata
contains theExportType
andallow_unused
flag, calculated during AST walk.ExportedItemMetadata
contains the span (bytepos of the export statement)ExportedItem
attaches the file path asPathBuf
type.ExportedItem
attaches the filePathBuf
right after ast walk since the process that finds unused exports and files removes extension from files. TODO: add config optionsupress_existing_unused
feature that adds// @ALLOW-UNUSED-EXPORT
comment on found unused items andsupress_existing_unused_message
to add information to those comments.