mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 06:15:08 +01:00
### Description: This pull request introduces two significant changes: **Improved Error Handling in `remap_file` Function:** - The error handling in the `remap_file` function has been simplified for improved clarity and user-friendliness. The original code included a combination of `assert` and `exit`, which could be perplexing during runtime. **Changes Made:** - Replaced the original `assert` and `exit` with a more straightforward `if-else` block for handling errors. - Utilized `sys.exit` for clear error messages and proper program termination when an error occurs. **Why I Did It:** - Improved Clarity: The original code's `assert` primarily served debugging purposes and might not behave as expected during runtime. The new code offers clarity and predictability. - User-Friendly Errors: The updated code provides users with easily understandable error messages. **Added `.DS_Store` to `.gitignore`:** - `.DS_Store` files are commonly generated by macOS Finder to store folder-specific metadata. They do not need to be tracked in version control. **Changes Made:** - Added `.DS_Store` to the `.gitignore` file. **Why I Did It:** - To prevent `.DS_Store` files from being tracked in the Git repository, ensuring a cleaner repository and avoiding unintended commits of macOS-specific files. ### Improvements: - **Better Error Handling:** The new code in the `remap_file` function ensures the program exits gracefully with informative error messages when errors occur. - **Enhanced Code Clarity:** The code now communicates its intentions more clearly with `sys.exit` for handling expected runtime errors. - **Cleaner Git Repository:** The addition of `.DS_Store` to `.gitignore` prevents the tracking of macOS-specific files in version control.
39 lines
750 B
Plaintext
39 lines
750 B
Plaintext
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
# Directories and symlinks generated by bazel.
|
|
/bazel-*
|
|
|
|
# Directories created by python.
|
|
**/__pycache__/
|
|
|
|
# Ignore the user's VSCode settings and debug setup.
|
|
/.vscode/settings.json
|
|
/.vscode/launch.json
|
|
|
|
# Ignore the user's Idea settings.
|
|
/.idea/
|
|
|
|
# Directories created by clangd
|
|
/.cache/clangd
|
|
|
|
# User-specific Bazel configuration.
|
|
/user.bazelrc
|
|
|
|
# Compilation database used by clangd
|
|
compile_commands.json
|
|
|
|
# Emacs temporary files
|
|
*~
|
|
\#*\#
|
|
|
|
# vim temporary files
|
|
.*.swp
|
|
|
|
# generated by utils/treesitter/helix.sh
|
|
/.helix/
|
|
|
|
# Ignore .DS_Store files
|
|
.DS_Store
|