Skip to content

Conversation

@cacapon
Copy link
Owner

@cacapon cacapon commented May 4, 2025

fixed #178
構造を整理したいなと思ってリファクタリングしました。
次のことを実施しています。

  • makeのログが長いと感じたので表示を少なくしました。(1)
  • ヘッダーファイルを書く処理に沿ってフォルダで分割しました。(2)
    • 分割に従ってmakefileのルールにincの指定を増やす処理を追加しています。
  • main.hでincludeしている量を減らして、子のinclude側で必要なincludeを増やしました。
    • ソースコード側のincludeは変更してません。

他に必要そうなリファクタリングがあればご提案ください。
他にない、このリファクタリングに問題なさそうだったらマージをお願いします。

(1) 現在このように出ます。

➤ make re
make fclean
Removing libft bin... ✅
make clean
cleaning libft... ✅
cleaning minishell objs... ✅
cleaning minishell empty dirs... ✅
Removing binary... ✅
make all
Building libft... ✅
Building minishell... ✅

(2) 構造はこんな感じにしています。

➤ tree inc/
inc/
├── builtin
│   ├── builtin.h
│   ├── builtin_utils.h
│   ├── env_utils.h
│   └── expand_env.h
├── common
│   ├── cmd.h
│   ├── common.h
│   ├── error.h
│   ├── initialize.h
│   └── struct.h
├── invoke_cmd
│   ├── create_envp.h
│   ├── exec_pipeline.h
│   ├── execute_cmd.h
│   ├── invoke_command.h
│   ├── pipeline_helper.h
│   └── redirect.h
├── main.h
├── parser
│   └── parser.h
├── signal
│   └── minish_signal.h
└── tokenizer
    └── tokenizer.h

@cacapon cacapon requested a review from dayano74 May 4, 2025 03:46
@cacapon cacapon self-assigned this May 4, 2025
dayano74
dayano74 previously approved these changes May 4, 2025
Copy link
Collaborator

@dayano74 dayano74 left a comment

Choose a reason for hiding this comment

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

いいと思います!
Makefileに書いてある処理手順を対面のときに少し説明してほしいです

@dayano74
Copy link
Collaborator

dayano74 commented May 4, 2025

@cacapon Makefileとparser.hのコンフリクト解消お願いします!

Copy link
Collaborator

@dayano74 dayano74 left a comment

Choose a reason for hiding this comment

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

リファクタリングありがとうございます!

@dayano74 dayano74 merged commit 0897cd7 into main May 4, 2025
2 checks passed
@dayano74 dayano74 deleted the feature/178-refactoring branch May 4, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

一度リファクタリングしたい

3 participants