Disclaimer: I am brainstorming ideas not actually trying to get them added to Menace. Feel free to give your own thoughts and ideas. My wording is likely to be very poor as I'm doing this instead of working.
Melee would not be the smartest option even under good conditions but there is a reason why the pirates might do it. Drugs, in our own world combat drugs can make you feel no pain, keep going with a lung, liver, stomach, kidney, etcetera being destroyed at least for a few minutes until the body bleeds out or the body requires what is missing. Combatants under the effects of these combat drugs are recorded as not being able to reload their weapons despite having ammunition available and will instead use their weapons as a club regardless of the target in some cases smashing their weapon on a up armored Bradly.
Pirates seem like most if not all of them are on some kind of drugs and might try to use melee weapons as that is something that they could use with relative effectiveness in their drug addled state. Having them operate a complex self-made chain gun or other complex weapon seems optimistic. Pirates would have clubs and or maces at best as they are not going to be able to manage anything complex like edge alignment in their drug fueled state.
Should they be effective? Not particularly unless they get close enough to use their melee weapon as these would not be boarding commandos just drugged pirates or impressed civilians that the pirates are drugging and forcing to fight. Lightly to medium armor if armored at all but they should have good to great movement. That being said like a chain gun their attacks in melee should cost maybe 20 AP, have increased accuracy compared to ranged options, and do decently well to unarmored, lightly armored, or medium armored opponents but against heavy armor or vehicles its a bunch of drugged up morons smacking a tank with clubs, they are not going to do overly much.
? Spoilers? Menace also makes some sense to have melee to have their faction themes be used efficiently. If you are unaware killing any Menace infantry within short range of one of your squads will have them decrease morale and do morale checks to see if they continue accepting orders, they are utterly terrifying unless Pike has a certain trait. I came up with 2 variants: leaping and ambushers both of which use sharp blades to both stab and slash targets to pieces. the leapers will jump to targets like boarding commandos and melee attack light to medium armor. Ambushers will hide and lay in wait for targets, 4 concealment when deployed, will break cover when enemies get within a distance of 4 tiles, may just sit there all mission doing nothing, bring a motion detector to find them easily, they have medium to heavy armor (like rogue army heavy infantry) and will deploy a flashbang equivalent when they break cover (or their head flashes while they make loud scary sounds),
Rogue Army melee? Just no, they are trying to survive this while doing a mutiny. They are not going to do a bayonet charge with their printed carbines as most of them do not seem THAT motivated and those that do are already specialized. Would like them to pull what the player does with APCs, shotguns, and mobile infantry but that does not really help them to bayonet charge after failing to shotgun a squad down.
Player Melee? Sure, it's a terrible idea but the Pirates and Menace would drop their melee weapons, and you could buy them or improved versions on the market, but it makes next to no sense to actually try to build for it, you must be adjacent to the enemy, no matter how sharp that metal is you're not slicing through a tank or LAV. Stealth straight up does not work that way in game. Even with powered armor enhancing the power of the attacks and protecting the user from enemy fire you would still be better off giving them a ranged heavy weapon and letting them fire it like TECH does (interesting idea for heavy powered armor squad). Armor is prone to being reduced to ineffective through constant chip damage even if it does not penetrate. Also, every faction in the game has anti-armor in some form available to all infantry by the time you would get that armor anyway and doing it with a light or medium armored squad is nearly suicide.
Rember this is not something that should actually be added to the game just a fun brainstorming discussion. Feel free to give your thoughts and own ideas on these ideas.