<commit_before>#include "commands.h"

#include "Workspace.h"
#include <busyUtils/busyUtils.h>
#include <iostream>

#define TERM_RED                        "\033[31m"
#define TERM_GREEN                      "\033[32m"
#define TERM_RESET                      "\033[0m"

using namespace busy;

namespace commands {

void cleanAll() {
	utils::rm("./build", true);
	utils::mkdir("./build");
	utils::rm(".busy", true, true);
	std::cout << "clean all done" << std::endl;

	// ignore exceptions
	try {
		Workspace ws;
		auto validPackages = ws.getPackages();
		auto allDepPackages = validPackages.begin()->getAllDependendPackages();
		std::vector<Package const*> noDepPackage;
		for (auto const& p : validPackages) {
			auto iter = std::find_if(allDepPackages.begin(), allDepPackages.end(), [&](Package const* p2) {
				return p.getName() == p2->getName();
			});
			if (iter == allDepPackages.end()) {
				noDepPackage.push_back(&p);
			}
		}

		if (noDepPackage.size() > 0) {
			std::cout << "\n" << TERM_RED << "Packages is not used or referenced:\n" << TERM_RESET;
			std::string paths;
			for (auto p : noDepPackage) {<commit_msg>adding force remove when cleanall is called<commit_after>#include "commands.h"

#include "Workspace.h"
#include <busyUtils/busyUtils.h>
#include <iostream>

#define TERM_RED                        "\033[31m"
#define TERM_GREEN                      "\033[32m"
#define TERM_RESET                      "\033[0m"

using namespace busy;

namespace commands {

void cleanAll() {
	utils::rm("./build", true, true);
	utils::mkdir("./build");
	utils::rm(".busy", true, true);
	std::cout << "clean all done" << std::endl;

	// ignore exceptions
	try {
		Workspace ws;
		auto validPackages = ws.getPackages();
		auto allDepPackages = validPackages.begin()->getAllDependendPackages();
		std::vector<Package const*> noDepPackage;
		for (auto const& p : validPackages) {
			auto iter = std::find_if(allDepPackages.begin(), allDepPackages.end(), [&](Package const* p2) {
				return p.getName() == p2->getName();
			});
			if (iter == allDepPackages.end()) {
				noDepPackage.push_back(&p);
			}
		}

		if (noDepPackage.size() > 0) {
			std::cout << "\n" << TERM_RED << "Packages is not used or referenced:\n" << TERM_RESET;
			std::string paths;
			for (auto p : noDepPackage) {
{'fraction_non_alphanumeric': 0.16375545851528384, 'fraction_numerical': 0.014847161572052401, 'mean_word_length': 3.3555133079847907, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '753171', 'n_tokens_mistral': 868, 'n_tokens_neox': 771, 'n_words': 181}